home *** CD-ROM | disk | FTP | other *** search
/ Java Developer's Companion / Java Developer's Companion.iso / Javacup / PR8ADPL7.TAR < prev    next >
Tape Archive  |  1996-06-10  |  1.7 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: PR8ADPL7.TAR

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive default
99% file POSIX tar archive, directory productivity_tools/PR8ADPL7/, mode 0040775, uid 0000000, gid 0000001, size 00000000000, seconds 06151162601, user root, group other, devmaj 0000040, devmin 0000210 default
98% file data default
62% TrID TAR - Tape ARchive (POSIX) default
37% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype POSIX tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive, owner user name: "vity_tools/PR8ADPL7/" default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 70 72 6f 64 75 63 74 69 | 76 69 74 79 5f 74 6f 6f |producti|vity_too|
|00000010| 6c 73 2f 50 52 38 41 44 | 50 4c 37 2f 00 00 00 00 |ls/PR8AD|PL7/....|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 30 30 34 30 | 37 37 35 00 30 30 30 30 |....0040|775.0000|
|00000070| 30 30 30 00 30 30 30 30 | 30 30 31 00 30 30 30 30 |000.0000|001.0000|
|00000080| 30 30 30 30 30 30 30 00 | 30 36 31 35 31 31 36 32 |0000000.|06151162|
|00000090| 36 30 31 00 30 30 31 36 | 33 35 34 00 35 00 00 00 |601.0016|354.5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 00 30 | 30 72 6f 6f 74 00 00 00 |.ustar.0|0root...|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 34 30 |........|.0000040|
|00000150| 00 30 30 30 30 32 31 30 | 00 00 00 00 00 00 00 00 |.0000210|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 70 72 6f 64 75 63 74 69 | 76 69 74 79 5f 74 6f 6f |producti|vity_too|
|00000210| 6c 73 2f 50 52 38 41 44 | 50 4c 37 2f 50 52 38 41 |ls/PR8AD|PL7/PR8A|
|00000220| 44 50 4c 37 2e 74 61 72 | 00 00 00 00 00 00 00 00 |DPL7.tar|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 30 31 30 30 | 36 34 34 00 30 30 30 30 |....0100|644.0000|
|00000270| 30 30 30 00 30 30 30 30 | 30 30 31 00 30 30 30 30 |000.0000|001.0000|
|00000280| 33 32 31 32 30 30 30 00 | 30 36 31 35 31 31 36 32 |3212000.|06151162|
|00000290| 35 36 36 00 30 30 32 30 | 32 33 30 00 30 00 00 00 |566.0020|230.0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 00 30 | 30 72 6f 6f 74 00 00 00 |.ustar.0|0root...|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 34 30 |........|.0000040|
|00000350| 00 30 30 30 30 32 31 30 | 00 00 00 00 00 00 00 00 |.0000210|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 50 52 38 41 44 50 4c 37 | 2f 00 00 00 00 00 00 00 |PR8ADPL7|/.......|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 30 30 34 30 | 37 37 35 00 30 30 30 30 |....0040|775.0000|
|00000470| 31 35 31 00 30 30 30 32 | 30 33 33 00 30 30 30 30 |151.0002|033.0000|
|00000480| 30 30 30 30 30 30 30 00 | 30 36 31 34 34 37 36 32 |0000000.|06144762|
|00000490| 36 36 32 00 30 30 31 32 | 32 36 37 00 35 00 00 00 |662.0012|267.5...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 00 30 | 30 66 6f 63 75 73 00 00 |.ustar.0|0focus..|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 77 77 77 00 00 00 00 |........|.www....|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 34 30 |........|.0000040|
|00000550| 00 30 30 30 30 30 31 36 | 00 00 00 00 00 00 00 00 |.0000016|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 50 52 38 41 44 50 4c 37 | 2f 41 64 6d 69 6e 43 6f |PR8ADPL7|/AdminCo|
|00000610| 6d 70 6f 6e 65 6e 74 2e | 63 6c 61 73 73 00 00 00 |mponent.|class...|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 30 31 30 30 | 36 34 34 00 30 30 30 30 |....0100|644.0000|
|00000670| 31 35 31 00 30 30 30 32 | 30 33 33 00 30 30 30 30 |151.0002|033.0000|
|00000680| 30 30 30 33 35 32 34 00 | 30 36 31 32 36 37 30 34 |0003524.|06126704|
|00000690| 36 32 35 00 30 30 31 36 | 32 32 33 00 30 00 00 00 |625.0016|223.0...|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 75 73 74 61 72 00 30 | 30 66 6f 63 75 73 00 00 |.ustar.0|0focus..|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 77 77 77 00 00 00 00 |........|.www....|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 34 30 |........|.0000040|
|00000750| 00 30 30 30 30 30 31 36 | 00 00 00 00 00 00 00 00 |.0000016|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| ca fe ba be 00 03 00 2d | 00 86 08 00 69 08 00 76 |.......-|....i..v|
|00000810| 08 00 6f 08 00 4a 08 00 | 5b 08 00 54 08 00 48 08 |..o..J..|[..T..H.|
|00000820| 00 4d 07 00 52 07 00 79 | 07 00 62 07 00 81 07 00 |.M..R..y|..b.....|
|00000830| 68 07 00 5c 07 00 72 07 | 00 7c 07 00 5f 07 00 58 |h..\..r.|.|.._..X|
|00000840| 07 00 84 07 00 73 07 00 | 6c 07 00 51 07 00 61 07 |.....s..|l..Q..a.|
|00000850| 00 4b 07 00 80 07 00 65 | 0a 00 13 00 41 0a 00 16 |.K.....e|....A...|
|00000860| 00 44 0a 00 12 00 44 0a | 00 0c 00 44 0a 00 13 00 |.D....D.|...D....|
|00000870| 44 0a 00 19 00 41 0a 00 | 14 00 3b 0a 00 0d 00 44 |D....A..|..;....D|
|00000880| 0a 00 0f 00 41 09 00 0e | 00 42 0a 00 0c 00 41 0a |....A...|.B....A.|
|00000890| 00 19 00 44 09 00 0e 00 | 3e 09 00 0d 00 3c 0a 00 |...D....|>....<..|
|000008a0| 0d 00 41 0a 00 1a 00 41 | 09 00 0e 00 3f 0a 00 1a |..A....A|....?...|
|000008b0| 00 44 0a 00 09 00 3d 09 | 00 0b 00 36 0a 00 14 00 |.D....=.|...6....|
|000008c0| 37 0a 00 17 00 43 0a 00 | 0f 00 44 09 00 0e 00 38 |7....C..|..D....8|
|000008d0| 0a 00 16 00 3a 09 00 0e | 00 39 0a 00 11 00 40 0c |....:...|.9....@.|
|000008e0| 00 7f 00 49 0c 00 7b 00 | 7d 0c 00 4f 00 63 0c 00 |...I..{.|}..O.c..|
|000008f0| 75 00 5a 0c 00 74 00 6e | 0c 00 50 00 6a 0c 00 67 |u.Z..t.n|..P.j..g|
|00000900| 00 4e 0c 00 82 00 4c 0c | 00 56 00 66 0c 00 64 00 |.N....L.|.V.f..d.|
|00000910| 6d 0c 00 82 00 7e 0c 00 | 83 00 85 0c 00 47 00 7a |m....~..|.....G.z|
|00000920| 0c 00 5d 00 57 0c 00 82 | 00 60 01 00 0f 4c 69 6e |..].W...|.`...Lin|
|00000930| 65 4e 75 6d 62 65 72 54 | 61 62 6c 65 01 00 0d 43 |eNumberT|able...C|
|00000940| 6f 6e 73 74 61 6e 74 56 | 61 6c 75 65 01 00 02 70 |onstantV|alue...p|
|00000950| 70 01 00 29 4f 6e 6c 79 | 20 72 6f 6f 74 20 63 61 |p..)Only| root ca|
|00000960| 6e 20 72 75 6e 20 74 68 | 65 20 41 64 6d 69 6e 43 |n run th|e AdminC|
|00000970| 6f 6d 70 6f 6e 65 6e 74 | 20 74 6f 6f 6c 01 00 12 |omponent| tool...|
|00000980| 4c 6a 61 76 61 2f 6c 61 | 6e 67 2f 53 74 72 69 6e |Ljava/la|ng/Strin|
|00000990| 67 3b 01 00 0a 50 72 6f | 70 65 72 74 69 65 73 01 |g;...Pro|perties.|
|000009a0| 00 11 55 73 65 72 45 64 | 69 74 52 65 71 75 65 73 |..UserEd|itReques|
|000009b0| 74 6f 72 01 00 15 28 4c | 6a 61 76 61 2f 6c 61 6e |tor...(L|java/lan|
|000009c0| 67 2f 53 74 72 69 6e 67 | 3b 29 56 01 00 04 72 6f |g/String|;)V...ro|
|000009d0| 6f 74 01 00 0b 4c 4a 46 | 53 63 6c 69 65 6e 74 3b |ot...LJF|Sclient;|
|000009e0| 01 00 02 75 70 01 00 03 | 61 64 64 01 00 0b 54 61 |...up...|add...Ta|
|000009f0| 62 62 65 64 50 61 6e 65 | 6c 01 00 0b 45 72 72 6f |bbedPane|l...Erro|
|00000a00| 72 57 69 6e 64 6f 77 01 | 00 0a 45 78 63 65 70 74 |rWindow.|..Except|
|00000a10| 69 6f 6e 73 01 00 0b 43 | 6f 6e 6e 65 63 74 69 6f |ions...C|onnectio|
|00000a20| 6e 73 01 00 0a 53 6f 75 | 72 63 65 46 69 6c 65 01 |ns...Sou|rceFile.|
|00000a30| 00 02 64 70 01 00 15 28 | 4c 6a 61 76 61 2f 6c 61 |..dp...(|Ljava/la|
|00000a40| 6e 67 2f 4f 62 6a 65 63 | 74 3b 29 5a 01 00 15 6a |ng/Objec|t;)Z...j|
|00000a50| 61 76 61 2f 61 77 74 2f | 42 6f 72 64 65 72 4c 61 |ava/awt/|BorderLa|
|00000a60| 79 6f 75 74 01 00 16 28 | 29 4c 6a 61 76 61 2f 61 |yout...(|)Ljava/a|
|00000a70| 77 74 2f 44 69 6d 65 6e | 73 69 6f 6e 3b 01 00 11 |wt/Dimen|sion;...|
|00000a80| 4c 50 72 6f 70 65 72 74 | 69 65 73 50 61 6e 65 6c |LPropert|iesPanel|
|00000a90| 3b 01 00 05 55 73 65 72 | 73 01 00 0e 41 64 6d 69 |;...User|s...Admi|
|00000aa0| 6e 43 6f 6d 70 6f 6e 65 | 6e 74 01 00 06 65 71 75 |nCompone|nt...equ|
|00000ab0| 61 6c 73 01 00 0a 77 61 | 6e 74 65 64 73 69 7a 65 |als...wa|ntedsize|
|00000ac0| 01 00 12 6a 61 76 61 2f | 61 77 74 2f 44 69 6d 65 |...java/|awt/Dime|
|00000ad0| 6e 73 69 6f 6e 01 00 03 | 28 29 56 01 00 10 6a 61 |nsion...|()V...ja|
|00000ae0| 76 61 2f 6c 61 6e 67 2f | 53 74 72 69 6e 67 01 00 |va/lang/|String..|
|00000af0| 09 4a 46 53 63 6c 69 65 | 6e 74 01 00 0c 4c 55 73 |.JFSclie|nt...LUs|
|00000b00| 65 72 73 50 61 6e 65 6c | 3b 01 00 02 63 70 01 00 |ersPanel|;...cp..|
|00000b10| 0c 44 65 76 69 63 65 73 | 50 61 6e 65 6c 01 00 0e |.Devices|Panel...|
|00000b20| 4c 44 65 76 69 63 65 73 | 50 61 6e 65 6c 3b 01 00 |LDevices|Panel;..|
|00000b30| 06 63 6c 69 65 6e 74 01 | 00 0c 4a 46 53 63 6f 6d |.client.|..JFScom|
|00000b40| 70 6f 6e 65 6e 74 01 00 | 06 43 65 6e 74 65 72 01 |ponent..|.Center.|
|00000b50| 00 3c 28 4c 6a 61 76 61 | 2f 6c 61 6e 67 2f 53 74 |.<(Ljava|/lang/St|
|00000b60| 72 69 6e 67 3b 4c 6a 61 | 76 61 2f 61 77 74 2f 43 |ring;Lja|va/awt/C|
|00000b70| 6f 6d 70 6f 6e 65 6e 74 | 3b 29 4c 6a 61 76 61 2f |omponent|;)Ljava/|
|00000b80| 61 77 74 2f 43 6f 6d 70 | 6f 6e 65 6e 74 3b 01 00 |awt/Comp|onent;..|
|00000b90| 17 28 4c 6a 61 76 61 2f | 61 70 70 6c 65 74 2f 41 |.(Ljava/|applet/A|
|00000ba0| 70 70 6c 65 74 3b 29 56 | 01 00 17 43 6f 6e 6e 65 |pplet;)V|...Conne|
|00000bb0| 63 74 69 6f 6e 49 6e 66 | 6f 52 65 71 75 65 73 74 |ctionInf|oRequest|
|00000bc0| 6f 72 01 00 12 4c 43 6f | 6e 6e 65 63 74 69 6f 6e |or...LCo|nnection|
|00000bd0| 73 50 61 6e 65 6c 3b 01 | 00 29 28 4c 6a 61 76 61 |sPanel;.|.)(Ljava|
|00000be0| 2f 6c 61 6e 67 2f 53 74 | 72 69 6e 67 3b 4c 6a 61 |/lang/St|ring;Lja|
|00000bf0| 76 61 2f 61 77 74 2f 43 | 6f 6d 70 6f 6e 65 6e 74 |va/awt/C|omponent|
|00000c00| 3b 29 56 01 00 08 50 72 | 69 6e 74 65 72 73 01 00 |;)V...Pr|inters..|
|00000c10| 13 41 64 6d 69 6e 43 6f | 6d 70 6f 6e 65 6e 74 2e |.AdminCo|mponent.|
|00000c20| 6a 61 76 61 01 00 04 69 | 6e 69 74 01 00 0d 50 72 |java...i|nit...Pr|
|00000c30| 69 6e 74 65 72 73 50 61 | 6e 65 6c 01 00 12 6a 61 |intersPa|nel...ja|
|00000c40| 76 61 2f 61 77 74 2f 43 | 6f 6e 74 61 69 6e 65 72 |va/awt/C|ontainer|
|00000c50| 01 00 07 61 64 64 49 74 | 65 6d 01 00 02 72 70 01 |...addIt|em...rp.|
|00000c60| 00 07 44 65 76 69 63 65 | 73 01 00 04 43 6f 64 65 |..Device|s...Code|
|00000c70| 01 00 0e 4c 6f 63 61 6c | 56 61 72 69 61 62 6c 65 |...Local|Variable|
|00000c80| 73 01 00 13 44 65 76 69 | 63 65 45 64 69 74 52 65 |s...Devi|ceEditRe|
|00000c90| 71 75 65 73 74 6f 72 01 | 00 0f 4c 50 72 69 6e 74 |questor.|..LPrint|
|00000ca0| 65 72 73 50 61 6e 65 6c | 3b 01 00 09 73 65 74 4c |ersPanel|;...setL|
|00000cb0| 61 79 6f 75 74 01 00 14 | 50 72 69 6e 74 65 72 45 |ayout...|PrinterE|
|00000cc0| 64 69 74 52 65 71 75 65 | 73 74 6f 72 01 00 1b 28 |ditReque|stor...(|
|00000cd0| 4c 6a 61 76 61 2f 61 77 | 74 2f 4c 61 79 6f 75 74 |Ljava/aw|t/Layout|
|00000ce0| 4d 61 6e 61 67 65 72 3b | 29 56 01 00 05 28 49 49 |Manager;|)V...(II|
|00000cf0| 29 56 01 00 08 61 75 74 | 68 6e 61 6d 65 01 00 10 |)V...aut|hname...|
|00000d00| 43 6f 6e 6e 65 63 74 69 | 6f 6e 73 50 61 6e 65 6c |Connecti|onsPanel|
|00000d10| 01 00 0a 55 73 65 72 73 | 50 61 6e 65 6c 01 00 06 |...Users|Panel...|
|00000d20| 3c 69 6e 69 74 3e 01 00 | 07 63 6f 6e 6e 65 63 74 |<init>..|.connect|
|00000d30| 01 00 0f 50 72 6f 70 65 | 72 74 69 65 73 50 61 6e |...Prope|rtiesPan|
|00000d40| 65 6c 01 00 0e 28 4c 4a | 46 53 63 6c 69 65 6e 74 |el...(LJ|FSclient|
|00000d50| 3b 29 56 00 01 00 0e 00 | 0d 00 00 00 05 00 00 00 |;)V.....|........|
|00000d60| 4f 00 63 00 00 00 00 00 | 47 00 7a 00 00 00 00 00 |O.c.....|G.z.....|
|00000d70| 64 00 6d 00 00 00 00 00 | 75 00 5a 00 00 00 00 00 |d.m.....|u.Z.....|
|00000d80| 56 00 66 00 00 00 04 00 | 00 00 71 00 6b 00 01 00 |V.f.....|..q.k...|
|00000d90| 77 00 00 00 ae 00 05 00 | 03 00 00 00 76 2a bb 00 |w.......|....v*..|
|00000da0| 12 59 b7 00 1d b6 00 2f | bb 00 16 59 b7 00 1c 4d |.Y...../|...Y...M|
|00000db0| 2c 12 05 2a bb 00 0c 59 | b7 00 1e 5a b5 00 32 b6 |,..*...Y|...Z..2.|
|00000dc0| 00 33 2c 12 03 2a bb 00 | 0f 59 b7 00 31 5a b5 00 |.3,..*..|.Y..1Z..|
|00000dd0| 24 b6 00 33 2c 12 06 2a | bb 00 19 59 b7 00 26 5a |$..3,..*|...Y..&Z|
|00000de0| b5 00 2b b6 00 33 2c 12 | 04 2a bb 00 13 59 b7 00 |..+..3,.|.*...Y..|
|00000df0| 1f 5a b5 00 34 b6 00 33 | 2c 12 02 2a bb 00 1a 59 |.Z..4..3|,..*...Y|
|00000e00| b7 00 2c 5a b5 00 27 b6 | 00 33 2a 12 01 2c b6 00 |..,Z..'.|.3*..,..|
|00000e10| 21 57 b1 00 00 00 01 00 | 45 00 00 00 26 00 09 00 |!W......|E...&...|
|00000e20| 00 00 1a 00 0b 00 1b 00 | 13 00 1c 00 25 00 1d 00 |........|....%...|
|00000e30| 37 00 1e 00 49 00 1f 00 | 5b 00 20 00 6d 00 21 00 |7...I...|[. .m.!.|
|00000e40| 75 00 17 00 00 00 83 00 | 85 00 01 00 77 00 00 00 |u.......|....w...|
|00000e50| 9a 00 02 00 02 00 00 00 | 5a 2a 2b b7 00 29 2a b4 |........|Z*+..)*.|
|00000e60| 00 28 b4 00 2e 12 08 b6 | 00 30 9a 00 11 bb 00 09 |.(......|.0......|
|00000e70| 12 07 b7 00 2d 2a 01 b5 | 00 28 b1 2a b4 00 32 2a |....-*..|.(.*..2*|
|00000e80| b4 00 28 b6 00 25 2a b4 | 00 24 2a b4 00 28 b6 00 |..(..%*.|.$*..(..|
|00000e90| 23 2a b4 00 2b 2a b4 00 | 28 b6 00 20 2a b4 00 34 |#*..+*..|(.. *..4|
|00000ea0| 2a b4 00 28 b6 00 1b 2a | b4 00 27 2a b4 00 28 b6 |*..(...*|..'*..(.|
|00000eb0| 00 2a b1 00 00 00 01 00 | 45 00 00 00 2e 00 0b 00 |.*......|E.......|
|00000ec0| 00 00 28 00 05 00 29 00 | 14 00 2a 00 1c 00 2b 00 |..(...).|..*...+.|
|00000ed0| 21 00 2c 00 22 00 2e 00 | 2d 00 2f 00 38 00 30 00 |!.,."...|-./.8.0.|
|00000ee0| 43 00 31 00 4e 00 32 00 | 59 00 26 00 00 00 5e 00 |C.1.N.2.|Y.&...^.|
|00000ef0| 59 00 01 00 77 00 00 00 | 26 00 04 00 01 00 00 00 |Y...w...|&.......|
|00000f00| 0e bb 00 11 59 11 01 f4 | 11 01 2c b7 00 35 b0 00 |....Y...|..,..5..|
|00000f10| 00 00 01 00 45 00 00 00 | 06 00 01 00 00 00 37 00 |....E...|......7.|
|00000f20| 01 00 82 00 60 00 01 00 | 77 00 00 00 1d 00 01 00 |....`...|w.......|
|00000f30| 01 00 00 00 05 2a b7 00 | 22 b1 00 00 00 01 00 45 |.....*..|"......E|
|00000f40| 00 00 00 06 00 01 00 00 | 00 0d 00 01 00 55 00 00 |........|.....U..|
|00000f50| 00 02 00 70 00 00 00 00 | 00 00 00 00 00 00 00 00 |...p....|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 50 52 38 41 44 50 4c 37 | 2f 41 64 6d 69 6e 43 6f |PR8ADPL7|/AdminCo|
|00001010| 6d 70 6f 6e 65 6e 74 2e | 6a 61 76 61 00 00 00 00 |mponent.|java....|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 30 31 30 30 | 36 34 34 00 30 30 30 30 |....0100|644.0000|
|00001070| 31 35 31 00 30 30 30 32 | 30 33 33 00 30 30 30 30 |151.0002|033.0000|
|00001080| 30 30 35 36 36 32 30 00 | 30 36 31 32 36 37 30 34 |0056620.|06126704|
|00001090| 36 32 36 00 30 30 31 36 | 30 34 35 00 30 00 00 00 |626.0016|045.0...|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 75 73 74 61 72 00 30 | 30 66 6f 63 75 73 00 00 |.ustar.0|0focus..|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 77 77 77 00 00 00 00 |........|.www....|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 34 30 |........|.0000040|
|00001150| 00 30 30 30 30 30 31 36 | 00 00 00 00 00 00 00 00 |.0000016|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 2f 2f 20 41 64 6d 69 6e | 43 6f 6d 70 6f 6e 65 6e |// Admin|Componen|
|00001210| 74 2e 6a 61 76 61 0a 2f | 2f 20 41 20 4a 46 53 20 |t.java./|/ A JFS |
|00001220| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 66 6f 72 20 |applicat|ion for |
|00001230| 70 65 72 66 6f 72 6d 69 | 6e 67 20 76 61 72 69 6f |performi|ng vario|
|00001240| 75 73 20 61 64 6d 69 6e | 20 74 61 73 6b 73 20 6f |us admin| tasks o|
|00001250| 6e 20 61 20 4a 46 53 20 | 73 65 72 76 65 72 2e 0a |n a JFS |server..|
|00001260| 2f 2f 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 09 2d |// For e|xample.-|
|00001270| 20 61 64 64 69 6e 67 2f | 64 65 6c 65 74 69 6e 67 | adding/|deleting|
|00001280| 2f 63 68 61 6e 67 69 6e | 67 20 75 73 65 72 73 0a |/changin|g users.|
|00001290| 2f 2f 09 09 2d 20 61 64 | 64 69 6e 67 2f 64 65 6c |//..- ad|ding/del|
|000012a0| 65 74 69 6e 67 2f 63 68 | 61 6e 67 69 6e 67 20 70 |eting/ch|anging p|
|000012b0| 72 69 6e 74 65 72 73 0a | 2f 2f 09 09 2d 20 6d 6f |rinters.|//..- mo|
|000012c0| 6e 69 74 6f 72 69 6e 67 | 20 63 6f 6e 6e 65 63 74 |nitoring| connect|
|000012d0| 69 6f 6e 73 0a 2f 2f 09 | 09 2d 20 67 65 74 74 69 |ions.//.|.- getti|
|000012e0| 6e 67 2f 73 65 74 74 69 | 6e 67 20 73 65 72 76 65 |ng/setti|ng serve|
|000012f0| 72 20 70 72 6f 70 65 72 | 74 69 65 73 0a 69 6d 70 |r proper|ties.imp|
|00001300| 6f 72 74 20 6a 61 76 61 | 2e 61 77 74 2e 2a 3b 0a |ort java|.awt.*;.|
|00001310| 69 6d 70 6f 72 74 20 6a | 61 76 61 2e 75 74 69 6c |import j|ava.util|
|00001320| 2e 56 65 63 74 6f 72 3b | 0a 69 6d 70 6f 72 74 20 |.Vector;|.import |
|00001330| 6a 61 76 61 2e 75 74 69 | 6c 2e 44 61 74 65 3b 0a |java.uti|l.Date;.|
|00001340| 69 6d 70 6f 72 74 20 6a | 61 76 61 2e 75 74 69 6c |import j|ava.util|
|00001350| 2e 53 74 72 69 6e 67 54 | 6f 6b 65 6e 69 7a 65 72 |.StringT|okenizer|
|00001360| 3b 0a 69 6d 70 6f 72 74 | 20 6a 61 76 61 2e 69 6f |;.import| java.io|
|00001370| 2e 49 4f 45 78 63 65 70 | 74 69 6f 6e 3b 0a 0a 70 |.IOExcep|tion;..p|
|00001380| 75 62 6c 69 63 20 63 6c | 61 73 73 20 41 64 6d 69 |ublic cl|ass Admi|
|00001390| 6e 43 6f 6d 70 6f 6e 65 | 6e 74 20 65 78 74 65 6e |nCompone|nt exten|
|000013a0| 64 73 20 4a 46 53 63 6f | 6d 70 6f 6e 65 6e 74 0a |ds JFSco|mponent.|
|000013b0| 7b 0a 09 55 73 65 72 73 | 50 61 6e 65 6c 20 75 70 |{..Users|Panel up|
|000013c0| 3b 0a 09 50 72 69 6e 74 | 65 72 73 50 61 6e 65 6c |;..Print|ersPanel|
|000013d0| 20 70 70 3b 0a 09 43 6f | 6e 6e 65 63 74 69 6f 6e | pp;..Co|nnection|
|000013e0| 73 50 61 6e 65 6c 20 63 | 70 3b 0a 09 50 72 6f 70 |sPanel c|p;..Prop|
|000013f0| 65 72 74 69 65 73 50 61 | 6e 65 6c 20 72 70 3b 0a |ertiesPa|nel rp;.|
|00001400| 09 44 65 76 69 63 65 73 | 50 61 6e 65 6c 20 64 70 |.Devices|Panel dp|
|00001410| 3b 0a 0a 09 2f 2f 20 69 | 6e 69 74 0a 09 2f 2f 20 |;...// i|nit..// |
|00001420| 53 65 74 75 70 20 74 68 | 69 73 20 63 6f 6d 70 6f |Setup th|is compo|
|00001430| 6e 65 6e 74 0a 09 76 6f | 69 64 20 69 6e 69 74 28 |nent..vo|id init(|
|00001440| 6a 61 76 61 2e 61 70 70 | 6c 65 74 2e 41 70 70 6c |java.app|let.Appl|
|00001450| 65 74 20 61 70 29 0a 09 | 7b 0a 09 2f 2f 20 63 72 |et ap)..|{..// cr|
|00001460| 65 61 74 65 20 75 73 65 | 72 20 69 6e 74 65 72 66 |eate use|r interf|
|00001470| 61 63 65 0a 09 73 65 74 | 4c 61 79 6f 75 74 28 6e |ace..set|Layout(n|
|00001480| 65 77 20 42 6f 72 64 65 | 72 4c 61 79 6f 75 74 28 |ew Borde|rLayout(|
|00001490| 29 29 3b 0a 09 54 61 62 | 62 65 64 50 61 6e 65 6c |));..Tab|bedPanel|
|000014a0| 20 74 20 3d 20 6e 65 77 | 20 54 61 62 62 65 64 50 | t = new| TabbedP|
|000014b0| 61 6e 65 6c 28 29 3b 0a | 09 74 2e 61 64 64 49 74 |anel();.|.t.addIt|
|000014c0| 65 6d 28 22 55 73 65 72 | 73 22 2c 75 70 20 3d 20 |em("User|s",up = |
|000014d0| 6e 65 77 20 55 73 65 72 | 73 50 61 6e 65 6c 28 29 |new User|sPanel()|
|000014e0| 29 3b 0a 09 74 2e 61 64 | 64 49 74 65 6d 28 22 50 |);..t.ad|dItem("P|
|000014f0| 72 69 6e 74 65 72 73 22 | 2c 70 70 20 3d 20 6e 65 |rinters"|,pp = ne|
|00001500| 77 20 50 72 69 6e 74 65 | 72 73 50 61 6e 65 6c 28 |w Printe|rsPanel(|
|00001510| 29 29 3b 0a 09 74 2e 61 | 64 64 49 74 65 6d 28 22 |));..t.a|ddItem("|
|00001520| 43 6f 6e 6e 65 63 74 69 | 6f 6e 73 22 2c 63 70 20 |Connecti|ons",cp |
|00001530| 3d 20 6e 65 77 20 43 6f | 6e 6e 65 63 74 69 6f 6e |= new Co|nnection|
|00001540| 73 50 61 6e 65 6c 28 29 | 29 3b 0a 09 74 2e 61 64 |sPanel()|);..t.ad|
|00001550| 64 49 74 65 6d 28 22 50 | 72 6f 70 65 72 74 69 65 |dItem("P|ropertie|
|00001560| 73 22 2c 72 70 20 3d 20 | 6e 65 77 20 50 72 6f 70 |s",rp = |new Prop|
|00001570| 65 72 74 69 65 73 50 61 | 6e 65 6c 28 29 29 3b 0a |ertiesPa|nel());.|
|00001580| 09 74 2e 61 64 64 49 74 | 65 6d 28 22 44 65 76 69 |.t.addIt|em("Devi|
|00001590| 63 65 73 22 2c 64 70 20 | 3d 20 6e 65 77 20 44 65 |ces",dp |= new De|
|000015a0| 76 69 63 65 73 50 61 6e | 65 6c 28 29 29 3b 0a 09 |vicesPan|el());..|
|000015b0| 61 64 64 28 22 43 65 6e | 74 65 72 22 2c 74 29 3b |add("Cen|ter",t);|
|000015c0| 0a 09 7d 0a 0a 09 2f 2f | 20 63 6f 6e 6e 65 63 74 |..}...//| connect|
|000015d0| 0a 09 2f 2f 20 55 73 65 | 20 74 68 69 73 20 63 6c |..// Use| this cl|
|000015e0| 69 65 6e 74 20 66 6f 72 | 20 74 61 6c 6b 69 6e 67 |ient for| talking|
|000015f0| 20 74 6f 20 74 68 65 20 | 73 65 72 76 65 72 0a 09 | to the |server..|
|00001600| 76 6f 69 64 20 63 6f 6e | 6e 65 63 74 28 4a 46 53 |void con|nect(JFS|
|00001610| 63 6c 69 65 6e 74 20 63 | 29 0a 09 7b 0a 09 73 75 |client c|)..{..su|
|00001620| 70 65 72 2e 63 6f 6e 6e | 65 63 74 28 63 29 3b 0a |per.conn|ect(c);.|
|00001630| 09 69 66 20 28 21 63 6c | 69 65 6e 74 2e 61 75 74 |.if (!cl|ient.aut|
|00001640| 68 6e 61 6d 65 2e 65 71 | 75 61 6c 73 28 22 72 6f |hname.eq|uals("ro|
|00001650| 6f 74 22 29 29 20 7b 0a | 09 09 6e 65 77 20 45 72 |ot")) {.|..new Er|
|00001660| 72 6f 72 57 69 6e 64 6f | 77 28 22 4f 6e 6c 79 20 |rorWindo|w("Only |
|00001670| 72 6f 6f 74 20 63 61 6e | 20 72 75 6e 20 74 68 65 |root can| run the|
|00001680| 20 41 64 6d 69 6e 43 6f | 6d 70 6f 6e 65 6e 74 20 | AdminCo|mponent |
|00001690| 74 6f 6f 6c 22 29 3b 0a | 09 09 63 6c 69 65 6e 74 |tool");.|..client|
|000016a0| 20 3d 20 6e 75 6c 6c 3b | 0a 09 09 72 65 74 75 72 | = null;|...retur|
|000016b0| 6e 3b 0a 09 09 7d 0a 09 | 75 70 2e 63 6f 6e 6e 65 |n;...}..|up.conne|
|000016c0| 63 74 28 63 6c 69 65 6e | 74 29 3b 0a 09 70 70 2e |ct(clien|t);..pp.|
|000016d0| 63 6f 6e 6e 65 63 74 28 | 63 6c 69 65 6e 74 29 3b |connect(|client);|
|000016e0| 0a 09 63 70 2e 63 6f 6e | 6e 65 63 74 28 63 6c 69 |..cp.con|nect(cli|
|000016f0| 65 6e 74 29 3b 0a 09 72 | 70 2e 63 6f 6e 6e 65 63 |ent);..r|p.connec|
|00001700| 74 28 63 6c 69 65 6e 74 | 29 3b 0a 09 64 70 2e 63 |t(client|);..dp.c|
|00001710| 6f 6e 6e 65 63 74 28 63 | 6c 69 65 6e 74 29 3b 0a |onnect(c|lient);.|
|00001720| 09 7d 0a 0a 09 44 69 6d | 65 6e 73 69 6f 6e 20 77 |.}...Dim|ension w|
|00001730| 61 6e 74 65 64 73 69 7a | 65 28 29 0a 09 7b 0a 09 |antedsiz|e()..{..|
|00001740| 72 65 74 75 72 6e 20 6e | 65 77 20 44 69 6d 65 6e |return n|ew Dimen|
|00001750| 73 69 6f 6e 28 35 30 30 | 2c 33 30 30 29 3b 0a 09 |sion(500|,300);..|
|00001760| 7d 0a 7d 0a 0a 0a 2f 2f | 20 55 73 65 72 73 50 61 |}.}...//| UsersPa|
|00001770| 6e 65 6c 0a 2f 2f 20 41 | 20 70 61 6e 65 6c 20 64 |nel.// A| panel d|
|00001780| 69 73 70 6c 61 79 69 6e | 67 20 61 20 6c 69 73 74 |isplayin|g a list|
|00001790| 20 6f 66 20 61 6c 6c 20 | 73 65 72 76 65 72 20 75 | of all |server u|
|000017a0| 73 65 72 73 20 66 6f 72 | 20 61 64 64 69 74 69 6f |sers for| additio|
|000017b0| 6e 2c 20 64 65 6c 65 74 | 69 6f 6e 20 61 6e 64 0a |n, delet|ion and.|
|000017c0| 2f 2f 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 2e |// modif|ication.|
|000017d0| 0a 63 6c 61 73 73 20 55 | 73 65 72 73 50 61 6e 65 |.class U|sersPane|
|000017e0| 6c 20 65 78 74 65 6e 64 | 73 20 50 61 6e 65 6c 0a |l extend|s Panel.|
|000017f0| 7b 0a 09 4a 46 53 63 6c | 69 65 6e 74 20 63 6c 69 |{..JFScl|ient cli|
|00001800| 65 6e 74 3b 0a 09 56 65 | 63 74 6f 72 20 75 73 65 |ent;..Ve|ctor use|
|00001810| 72 73 20 3d 20 6e 65 77 | 20 56 65 63 74 6f 72 28 |rs = new| Vector(|
|00001820| 29 3b 0a 09 44 6f 75 62 | 6c 65 4c 69 73 74 50 61 |);..Doub|leListPa|
|00001830| 6e 65 6c 20 6c 69 73 74 | 3b 0a 09 42 75 74 74 6f |nel list|;..Butto|
|00001840| 6e 20 61 64 64 2c 64 65 | 6c 2c 6d 6f 64 3b 0a 0a |n add,de|l,mod;..|
|00001850| 09 55 73 65 72 73 50 61 | 6e 65 6c 28 29 0a 09 7b |.UsersPa|nel()..{|
|00001860| 0a 09 73 65 74 4c 61 79 | 6f 75 74 28 6e 65 77 20 |..setLay|out(new |
|00001870| 42 6f 72 64 65 72 4c 61 | 79 6f 75 74 28 29 29 3b |BorderLa|yout());|
|00001880| 0a 09 61 64 64 28 22 43 | 65 6e 74 65 72 22 2c 6c |..add("C|enter",l|
|00001890| 69 73 74 20 3d 20 6e 65 | 77 20 44 6f 75 62 6c 65 |ist = ne|w Double|
|000018a0| 4c 69 73 74 50 61 6e 65 | 6c 28 22 55 73 65 72 6e |ListPane|l("Usern|
|000018b0| 61 6d 65 22 2c 22 52 65 | 61 6c 20 6e 61 6d 65 22 |ame","Re|al name"|
|000018c0| 29 29 3b 0a 09 50 61 6e | 65 6c 20 74 6f 70 20 3d |));..Pan|el top =|
|000018d0| 20 6e 65 77 20 50 61 6e | 65 6c 28 29 3b 0a 09 74 | new Pan|el();..t|
|000018e0| 6f 70 2e 73 65 74 4c 61 | 79 6f 75 74 28 6e 65 77 |op.setLa|yout(new|
|000018f0| 20 46 6c 6f 77 4c 61 79 | 6f 75 74 28 46 6c 6f 77 | FlowLay|out(Flow|
|00001900| 4c 61 79 6f 75 74 2e 4c | 45 46 54 29 29 3b 0a 09 |Layout.L|EFT));..|
|00001910| 74 6f 70 2e 61 64 64 28 | 61 64 64 20 3d 20 6e 65 |top.add(|add = ne|
|00001920| 77 20 42 75 74 74 6f 6e | 28 22 41 64 64 22 29 29 |w Button|("Add"))|
|00001930| 3b 0a 09 74 6f 70 2e 61 | 64 64 28 64 65 6c 20 3d |;..top.a|dd(del =|
|00001940| 20 6e 65 77 20 42 75 74 | 74 6f 6e 28 22 44 65 6c | new But|ton("Del|
|00001950| 65 74 65 22 29 29 3b 0a | 09 74 6f 70 2e 61 64 64 |ete"));.|.top.add|
|00001960| 28 6d 6f 64 20 3d 20 6e | 65 77 20 42 75 74 74 6f |(mod = n|ew Butto|
|00001970| 6e 28 22 4d 6f 64 69 66 | 79 22 29 29 3b 0a 09 61 |n("Modif|y"));..a|
|00001980| 64 64 28 22 4e 6f 72 74 | 68 22 2c 74 6f 70 29 3b |dd("Nort|h",top);|
|00001990| 0a 09 7d 0a 0a 09 2f 2f | 20 63 6f 6e 6e 65 63 74 |..}...//| connect|
|000019a0| 0a 09 2f 2f 20 52 65 74 | 72 69 65 76 65 20 61 20 |..// Ret|rieve a |
|000019b0| 6c 69 73 74 20 6f 66 20 | 75 73 65 72 73 20 66 72 |list of |users fr|
|000019c0| 6f 6d 20 74 68 65 20 73 | 65 72 76 65 72 0a 09 76 |om the s|erver..v|
|000019d0| 6f 69 64 20 63 6f 6e 6e | 65 63 74 28 4a 46 53 63 |oid conn|ect(JFSc|
|000019e0| 6c 69 65 6e 74 20 63 29 | 0a 09 7b 0a 09 2f 2f 20 |lient c)|..{..// |
|000019f0| 42 75 69 6c 64 20 6c 69 | 73 74 20 6f 66 20 4a 46 |Build li|st of JF|
|00001a00| 53 75 73 65 72 20 73 74 | 72 75 63 74 75 72 65 73 |Suser st|ructures|
|00001a10| 0a 09 63 6c 69 65 6e 74 | 20 3d 20 63 3b 0a 09 42 |..client| = c;..B|
|00001a20| 75 66 66 65 72 49 6e 70 | 75 74 53 74 72 65 61 6d |ufferInp|utStream|
|00001a30| 20 62 75 66 20 3d 20 6e | 75 6c 6c 3b 0a 09 74 72 | buf = n|ull;..tr|
|00001a40| 79 20 62 75 66 20 3d 20 | 6e 65 77 20 42 75 66 66 |y buf = |new Buff|
|00001a50| 65 72 49 6e 70 75 74 53 | 74 72 65 61 6d 28 63 6c |erInputS|tream(cl|
|00001a60| 69 65 6e 74 2e 67 65 74 | 28 22 2f 65 74 63 2f 75 |ient.get|("/etc/u|
|00001a70| 73 65 72 73 22 2c 30 29 | 29 3b 0a 09 63 61 74 63 |sers",0)|);..catc|
|00001a80| 68 28 52 65 71 75 65 73 | 74 45 78 63 65 70 74 69 |h(Reques|tExcepti|
|00001a90| 6f 6e 20 65 29 20 7b 0a | 09 09 6e 65 77 20 45 72 |on e) {.|..new Er|
|00001aa0| 72 6f 72 57 69 6e 64 6f | 77 28 22 43 6f 75 6c 64 |rorWindo|w("Could|
|00001ab0| 20 6e 6f 74 20 72 65 61 | 64 20 2f 65 74 63 2f 75 | not rea|d /etc/u|
|00001ac0| 73 65 72 73 20 3a 20 22 | 2b 65 2e 67 65 74 4d 65 |sers : "|+e.getMe|
|00001ad0| 73 73 61 67 65 28 29 29 | 3b 0a 09 09 72 65 74 75 |ssage())|;...retu|
|00001ae0| 72 6e 3b 0a 09 09 7d 0a | 09 74 72 79 20 7b 0a 09 |rn;...}.|.try {..|
|00001af0| 09 77 68 69 6c 65 28 74 | 72 75 65 29 0a 09 09 09 |.while(t|rue)....|
|00001b00| 75 73 65 72 73 2e 61 64 | 64 45 6c 65 6d 65 6e 74 |users.ad|dElement|
|00001b10| 28 6e 65 77 20 4a 46 53 | 75 73 65 72 28 62 75 66 |(new JFS|user(buf|
|00001b20| 2e 67 65 74 73 28 29 29 | 29 3b 0a 09 09 7d 0a 09 |.gets())|);...}..|
|00001b30| 63 61 74 63 68 28 49 4f | 45 78 63 65 70 74 69 6f |catch(IO|Exceptio|
|00001b40| 6e 20 65 29 3b 0a 09 66 | 69 6c 6c 28 29 3b 0a 09 |n e);..f|ill();..|
|00001b50| 7d 0a 0a 09 2f 2f 20 66 | 69 6c 6c 0a 09 2f 2f 20 |}...// f|ill..// |
|00001b60| 46 69 6c 6c 20 74 68 65 | 20 6c 69 73 74 20 77 69 |Fill the| list wi|
|00001b70| 74 68 20 6b 6e 6f 77 6e | 20 75 73 65 72 73 0a 09 |th known| users..|
|00001b80| 76 6f 69 64 20 66 69 6c | 6c 28 29 0a 09 7b 0a 09 |void fil|l()..{..|
|00001b90| 2f 2f 20 44 69 73 70 6c | 61 79 20 74 68 65 20 6c |// Displ|ay the l|
|00001ba0| 69 73 74 0a 09 6c 69 73 | 74 2e 63 6c 65 61 72 28 |ist..lis|t.clear(|
|00001bb0| 29 3b 0a 09 66 6f 72 28 | 69 6e 74 20 69 3d 30 3b |);..for(|int i=0;|
|00001bc0| 20 69 3c 75 73 65 72 73 | 2e 73 69 7a 65 28 29 3b | i<users|.size();|
|00001bd0| 20 69 2b 2b 29 20 7b 0a | 09 09 4a 46 53 75 73 65 | i++) {.|..JFSuse|
|00001be0| 72 20 75 20 3d 20 28 4a | 46 53 75 73 65 72 29 75 |r u = (J|FSuser)u|
|00001bf0| 73 65 72 73 2e 65 6c 65 | 6d 65 6e 74 41 74 28 69 |sers.ele|mentAt(i|
|00001c00| 29 3b 0a 09 09 6c 69 73 | 74 2e 61 64 64 49 74 65 |);...lis|t.addIte|
|00001c10| 6d 28 75 2e 6e 61 6d 65 | 2c 20 75 2e 72 65 61 6c |m(u.name|, u.real|
|00001c20| 6e 61 6d 65 29 3b 0a 09 | 09 7d 0a 09 7d 0a 0a 09 |name);..|.}..}...|
|00001c30| 2f 2f 20 77 72 69 74 65 | 0a 09 2f 2f 20 57 72 69 |// write|..// Wri|
|00001c40| 74 65 20 74 68 65 20 6c | 69 73 74 20 6f 66 20 75 |te the l|ist of u|
|00001c50| 73 65 72 73 20 62 61 63 | 6b 20 74 6f 20 2f 65 74 |sers bac|k to /et|
|00001c60| 63 2f 75 73 65 72 73 0a | 09 76 6f 69 64 20 77 72 |c/users.|.void wr|
|00001c70| 69 74 65 28 29 0a 09 7b | 0a 09 42 75 66 66 65 72 |ite()..{|..Buffer|
|00001c80| 4f 75 74 70 75 74 53 74 | 72 65 61 6d 20 62 75 66 |OutputSt|ream buf|
|00001c90| 20 3d 20 6e 65 77 20 42 | 75 66 66 65 72 4f 75 74 | = new B|ufferOut|
|00001ca0| 70 75 74 53 74 72 65 61 | 6d 28 29 3b 0a 09 66 6f |putStrea|m();..fo|
|00001cb0| 72 28 69 6e 74 20 69 3d | 30 3b 20 69 3c 75 73 65 |r(int i=|0; i<use|
|00001cc0| 72 73 2e 73 69 7a 65 28 | 29 3b 20 69 2b 2b 29 0a |rs.size(|); i++).|
|00001cd0| 09 09 62 75 66 2e 70 75 | 74 73 28 28 28 4a 46 53 |..buf.pu|ts(((JFS|
|00001ce0| 75 73 65 72 29 75 73 65 | 72 73 2e 65 6c 65 6d 65 |user)use|rs.eleme|
|00001cf0| 6e 74 41 74 28 69 29 29 | 2e 6f 75 74 70 75 74 28 |ntAt(i))|.output(|
|00001d00| 29 29 3b 0a 09 74 72 79 | 20 63 6c 69 65 6e 74 2e |));..try| client.|
|00001d10| 70 75 74 28 22 2f 65 74 | 63 2f 75 73 65 72 73 22 |put("/et|c/users"|
|00001d20| 2c 20 30 2c 20 62 75 66 | 2e 67 65 74 61 72 72 61 |, 0, buf|.getarra|
|00001d30| 79 28 29 2c 20 22 74 65 | 78 74 2f 70 6c 61 69 6e |y(), "te|xt/plain|
|00001d40| 22 29 3b 0a 09 63 61 74 | 63 68 28 52 65 71 75 65 |");..cat|ch(Reque|
|00001d50| 73 74 45 78 63 65 70 74 | 69 6f 6e 20 65 29 0a 09 |stExcept|ion e)..|
|00001d60| 09 6e 65 77 20 45 72 72 | 6f 72 57 69 6e 64 6f 77 |.new Err|orWindow|
|00001d70| 28 22 46 61 69 6c 65 64 | 20 74 6f 20 77 72 69 74 |("Failed| to writ|
|00001d80| 65 20 74 6f 20 2f 65 74 | 63 2f 75 73 65 72 73 20 |e to /et|c/users |
|00001d90| 3a 20 22 2b 0a 09 09 09 | 09 65 2e 67 65 74 4d 65 |: "+....|.e.getMe|
|00001da0| 73 73 61 67 65 28 29 29 | 3b 0a 09 7d 0a 0a 09 70 |ssage())|;..}...p|
|00001db0| 75 62 6c 69 63 20 62 6f | 6f 6c 65 61 6e 20 61 63 |ublic bo|olean ac|
|00001dc0| 74 69 6f 6e 28 45 76 65 | 6e 74 20 65 76 74 2c 20 |tion(Eve|nt evt, |
|00001dd0| 4f 62 6a 65 63 74 20 6f | 62 6a 29 0a 09 7b 0a 09 |Object o|bj)..{..|
|00001de0| 69 6e 74 20 73 65 6c 20 | 3d 20 6c 69 73 74 2e 73 |int sel |= list.s|
|00001df0| 65 6c 65 63 74 65 64 28 | 29 3b 0a 09 69 66 20 28 |elected(|);..if (|
|00001e00| 65 76 74 2e 74 61 72 67 | 65 74 20 3d 3d 20 61 64 |evt.targ|et == ad|
|00001e10| 64 29 20 7b 0a 09 09 2f | 2f 20 41 64 64 20 62 75 |d) {.../|/ Add bu|
|00001e20| 74 74 6f 6e 20 63 6c 69 | 63 6b 65 64 2e 20 4f 70 |tton cli|cked. Op|
|00001e30| 65 6e 20 6e 65 77 20 75 | 73 65 72 20 64 65 74 61 |en new u|ser deta|
|00001e40| 69 6c 73 20 72 65 71 75 | 65 73 74 6f 72 2e 0a 09 |ils requ|estor...|
|00001e50| 09 6e 65 77 20 55 73 65 | 72 45 64 69 74 52 65 71 |.new Use|rEditReq|
|00001e60| 75 65 73 74 6f 72 28 74 | 68 69 73 29 3b 0a 09 09 |uestor(t|his);...|
|00001e70| 7d 0a 09 65 6c 73 65 20 | 69 66 20 28 65 76 74 2e |}..else |if (evt.|
|00001e80| 74 61 72 67 65 74 20 3d | 3d 20 64 65 6c 29 20 7b |target =|= del) {|
|00001e90| 0a 09 09 2f 2f 20 44 65 | 6c 65 74 65 20 62 75 74 |...// De|lete but|
|00001ea0| 74 6f 6e 20 63 6c 69 63 | 6b 65 64 2e 20 52 65 6d |ton clic|ked. Rem|
|00001eb0| 6f 76 65 20 74 68 69 73 | 20 75 73 65 72 0a 09 09 |ove this| user...|
|00001ec0| 69 66 20 28 73 65 6c 20 | 3c 20 30 29 20 72 65 74 |if (sel |< 0) ret|
|00001ed0| 75 72 6e 20 66 61 6c 73 | 65 3b 0a 09 09 75 73 65 |urn fals|e;...use|
|00001ee0| 72 73 2e 72 65 6d 6f 76 | 65 45 6c 65 6d 65 6e 74 |rs.remov|eElement|
|00001ef0| 41 74 28 73 65 6c 29 3b | 0a 09 09 66 69 6c 6c 28 |At(sel);|...fill(|
|00001f00| 29 3b 0a 09 09 77 72 69 | 74 65 28 29 3b 0a 09 09 |);...wri|te();...|
|00001f10| 7d 0a 09 65 6c 73 65 20 | 69 66 20 28 65 76 74 2e |}..else |if (evt.|
|00001f20| 74 61 72 67 65 74 20 3d | 3d 20 6d 6f 64 20 7c 7c |target =|= mod |||
|00001f30| 0a 09 09 20 65 76 74 2e | 74 61 72 67 65 74 20 3d |... evt.|target =|
|00001f40| 3d 20 6c 69 73 74 20 26 | 26 20 28 28 53 74 72 69 |= list &|& ((Stri|
|00001f50| 6e 67 29 65 76 74 2e 61 | 72 67 29 2e 65 71 75 61 |ng)evt.a|rg).equa|
|00001f60| 6c 73 28 22 44 6f 75 62 | 6c 65 22 29 29 20 7b 0a |ls("Doub|le")) {.|
|00001f70| 09 09 2f 2f 20 4d 6f 64 | 69 66 79 20 62 75 74 74 |..// Mod|ify butt|
|00001f80| 6f 6e 20 63 6c 69 63 6b | 65 64 2e 20 4f 70 65 6e |on click|ed. Open|
|00001f90| 20 72 65 71 75 65 73 74 | 6f 72 20 74 6f 20 65 64 | request|or to ed|
|00001fa0| 69 74 20 75 73 65 72 0a | 09 09 69 66 20 28 73 65 |it user.|..if (se|
|00001fb0| 6c 20 3c 20 30 29 20 72 | 65 74 75 72 6e 20 66 61 |l < 0) r|eturn fa|
|00001fc0| 6c 73 65 3b 0a 09 09 6e | 65 77 20 55 73 65 72 45 |lse;...n|ew UserE|
|00001fd0| 64 69 74 52 65 71 75 65 | 73 74 6f 72 28 74 68 69 |ditReque|stor(thi|
|00001fe0| 73 2c 20 73 65 6c 29 3b | 0a 09 09 7d 0a 09 72 65 |s, sel);|...}..re|
|00001ff0| 74 75 72 6e 20 74 72 75 | 65 3b 0a 09 7d 0a 7d 0a |turn tru|e;..}.}.|
|00002000| 0a 2f 2f 20 55 73 65 72 | 45 64 69 74 52 65 71 75 |.// User|EditRequ|
|00002010| 65 73 74 6f 72 0a 2f 2f | 20 41 20 77 69 6e 64 6f |estor.//| A windo|
|00002020| 77 20 66 6f 72 20 65 64 | 69 74 69 6e 67 20 6f 72 |w for ed|iting or|
|00002030| 20 61 64 64 69 6e 67 20 | 61 20 75 73 65 72 0a 63 | adding |a user.c|
|00002040| 6c 61 73 73 20 55 73 65 | 72 45 64 69 74 52 65 71 |lass Use|rEditReq|
|00002050| 75 65 73 74 6f 72 20 65 | 78 74 65 6e 64 73 20 46 |uestor e|xtends F|
|00002060| 69 78 65 64 46 72 61 6d | 65 0a 7b 0a 09 55 73 65 |ixedFram|e.{..Use|
|00002070| 72 73 50 61 6e 65 6c 20 | 70 61 72 65 6e 74 3b 0a |rsPanel |parent;.|
|00002080| 09 69 6e 74 20 73 65 6c | 20 3d 20 2d 31 3b 0a 09 |.int sel| = -1;..|
|00002090| 54 65 78 74 46 69 65 6c | 64 20 6e 61 6d 65 2c 20 |TextFiel|d name, |
|000020a0| 72 65 61 6c 2c 20 70 61 | 73 73 77 6f 72 64 2c 20 |real, pa|ssword, |
|000020b0| 68 6f 6d 65 64 69 72 2c | 20 67 72 6f 75 70 73 3b |homedir,| groups;|
|000020c0| 0a 09 43 68 65 63 6b 62 | 6f 78 20 68 6f 6d 65 79 |..Checkb|ox homey|
|000020d0| 65 73 2c 20 68 6f 6d 65 | 6e 6f 3b 0a 09 42 75 74 |es, home|no;..But|
|000020e0| 74 6f 6e 20 6f 6b 2c 63 | 61 6e 63 65 6c 3b 0a 0a |ton ok,c|ancel;..|
|000020f0| 09 2f 2f 20 43 72 65 61 | 74 65 20 61 20 72 65 71 |.// Crea|te a req|
|00002100| 75 65 73 74 6f 72 20 66 | 6f 72 20 61 64 64 69 6e |uestor f|or addin|
|00002110| 67 20 61 20 6e 65 77 20 | 75 73 65 72 0a 09 55 73 |g a new |user..Us|
|00002120| 65 72 45 64 69 74 52 65 | 71 75 65 73 74 6f 72 28 |erEditRe|questor(|
|00002130| 55 73 65 72 73 50 61 6e | 65 6c 20 70 29 0a 09 7b |UsersPan|el p)..{|
|00002140| 0a 09 73 75 70 65 72 28 | 6e 65 77 20 44 69 6d 65 |..super(|new Dime|
|00002150| 6e 73 69 6f 6e 28 33 30 | 30 2c 20 2d 31 29 29 3b |nsion(30|0, -1));|
|00002160| 0a 09 70 61 72 65 6e 74 | 20 3d 20 70 3b 0a 09 2f |..parent| = p;../|
|00002170| 2f 20 63 72 65 61 74 65 | 20 75 73 65 72 20 69 6e |/ create| user in|
|00002180| 74 65 72 66 61 63 65 0a | 09 73 65 74 4c 61 79 6f |terface.|.setLayo|
|00002190| 75 74 28 6e 65 77 20 42 | 6f 72 64 65 72 4c 61 79 |ut(new B|orderLay|
|000021a0| 6f 75 74 28 29 29 3b 0a | 09 50 61 6e 65 6c 20 74 |out());.|.Panel t|
|000021b0| 6f 70 20 3d 20 6e 65 77 | 20 50 61 6e 65 6c 28 29 |op = new| Panel()|
|000021c0| 3b 0a 09 74 6f 70 2e 73 | 65 74 4c 61 79 6f 75 74 |;..top.s|etLayout|
|000021d0| 28 6e 65 77 20 42 6f 72 | 64 65 72 4c 61 79 6f 75 |(new Bor|derLayou|
|000021e0| 74 28 29 29 3b 0a 09 50 | 61 6e 65 6c 20 6c 65 66 |t());..P|anel lef|
|000021f0| 74 20 3d 20 6e 65 77 20 | 50 61 6e 65 6c 28 29 3b |t = new |Panel();|
|00002200| 0a 09 6c 65 66 74 2e 73 | 65 74 4c 61 79 6f 75 74 |..left.s|etLayout|
|00002210| 28 6e 65 77 20 47 72 69 | 64 4c 61 79 6f 75 74 28 |(new Gri|dLayout(|
|00002220| 36 2c 31 29 29 3b 0a 09 | 6c 65 66 74 2e 61 64 64 |6,1));..|left.add|
|00002230| 28 6e 65 77 20 4c 61 62 | 65 6c 28 22 55 73 65 72 |(new Lab|el("User|
|00002240| 6e 61 6d 65 22 29 29 3b | 0a 09 6c 65 66 74 2e 61 |name"));|..left.a|
|00002250| 64 64 28 6e 65 77 20 4c | 61 62 65 6c 28 22 52 65 |dd(new L|abel("Re|
|00002260| 61 6c 20 6e 61 6d 65 22 | 29 29 3b 0a 09 6c 65 66 |al name"|));..lef|
|00002270| 74 2e 61 64 64 28 6e 65 | 77 20 4c 61 62 65 6c 28 |t.add(ne|w Label(|
|00002280| 22 50 61 73 73 77 6f 72 | 64 22 29 29 3b 0a 09 6c |"Passwor|d"));..l|
|00002290| 65 66 74 2e 61 64 64 28 | 6e 65 77 20 4c 61 62 65 |eft.add(|new Labe|
|000022a0| 6c 28 22 47 72 6f 75 70 | 73 22 29 29 3b 0a 09 6c |l("Group|s"));..l|
|000022b0| 65 66 74 2e 61 64 64 28 | 6e 65 77 20 4c 61 62 65 |eft.add(|new Labe|
|000022c0| 6c 28 22 48 6f 6d 65 20 | 64 69 72 22 29 29 3b 0a |l("Home |dir"));.|
|000022d0| 09 6c 65 66 74 2e 61 64 | 64 28 6e 65 77 20 4c 61 |.left.ad|d(new La|
|000022e0| 62 65 6c 28 22 43 72 65 | 61 74 65 20 68 6f 6d 65 |bel("Cre|ate home|
|000022f0| 20 64 69 72 22 29 29 3b | 0a 09 74 6f 70 2e 61 64 | dir"));|..top.ad|
|00002300| 64 28 22 57 65 73 74 22 | 2c 6c 65 66 74 29 3b 0a |d("West"|,left);.|
|00002310| 09 50 61 6e 65 6c 20 72 | 69 67 68 74 20 3d 20 6e |.Panel r|ight = n|
|00002320| 65 77 20 50 61 6e 65 6c | 28 29 3b 0a 09 72 69 67 |ew Panel|();..rig|
|00002330| 68 74 2e 73 65 74 4c 61 | 79 6f 75 74 28 6e 65 77 |ht.setLa|yout(new|
|00002340| 20 47 72 69 64 4c 61 79 | 6f 75 74 28 36 2c 31 29 | GridLay|out(6,1)|
|00002350| 29 3b 0a 09 72 69 67 68 | 74 2e 61 64 64 28 6e 61 |);..righ|t.add(na|
|00002360| 6d 65 20 3d 20 6e 65 77 | 20 54 65 78 74 46 69 65 |me = new| TextFie|
|00002370| 6c 64 28 29 29 3b 0a 09 | 72 69 67 68 74 2e 61 64 |ld());..|right.ad|
|00002380| 64 28 72 65 61 6c 20 3d | 20 6e 65 77 20 54 65 78 |d(real =| new Tex|
|00002390| 74 46 69 65 6c 64 28 29 | 29 3b 0a 09 72 69 67 68 |tField()|);..righ|
|000023a0| 74 2e 61 64 64 28 70 61 | 73 73 77 6f 72 64 20 3d |t.add(pa|ssword =|
|000023b0| 20 6e 65 77 20 54 65 78 | 74 46 69 65 6c 64 28 29 | new Tex|tField()|
|000023c0| 29 3b 0a 09 72 69 67 68 | 74 2e 61 64 64 28 67 72 |);..righ|t.add(gr|
|000023d0| 6f 75 70 73 20 3d 20 6e | 65 77 20 54 65 78 74 46 |oups = n|ew TextF|
|000023e0| 69 65 6c 64 28 29 29 3b | 0a 09 72 69 67 68 74 2e |ield());|..right.|
|000023f0| 61 64 64 28 68 6f 6d 65 | 64 69 72 20 3d 20 6e 65 |add(home|dir = ne|
|00002400| 77 20 54 65 78 74 46 69 | 65 6c 64 28 29 29 3b 0a |w TextFi|eld());.|
|00002410| 09 50 61 6e 65 6c 20 68 | 70 20 3d 20 6e 65 77 20 |.Panel h|p = new |
|00002420| 50 61 6e 65 6c 28 29 3b | 0a 09 68 70 2e 73 65 74 |Panel();|..hp.set|
|00002430| 4c 61 79 6f 75 74 28 6e | 65 77 20 46 6c 6f 77 4c |Layout(n|ew FlowL|
|00002440| 61 79 6f 75 74 28 46 6c | 6f 77 4c 61 79 6f 75 74 |ayout(Fl|owLayout|
|00002450| 2e 4c 45 46 54 2c 20 35 | 2c 20 30 29 29 3b 0a 09 |.LEFT, 5|, 0));..|
|00002460| 43 68 65 63 6b 62 6f 78 | 47 72 6f 75 70 20 68 67 |Checkbox|Group hg|
|00002470| 20 3d 20 6e 65 77 20 43 | 68 65 63 6b 62 6f 78 47 | = new C|heckboxG|
|00002480| 72 6f 75 70 28 29 3b 0a | 09 68 70 2e 61 64 64 28 |roup();.|.hp.add(|
|00002490| 68 6f 6d 65 79 65 73 20 | 3d 20 6e 65 77 20 43 68 |homeyes |= new Ch|
|000024a0| 65 63 6b 62 6f 78 28 22 | 59 65 73 22 2c 20 68 67 |eckbox("|Yes", hg|
|000024b0| 2c 20 74 72 75 65 29 29 | 3b 0a 09 68 70 2e 61 64 |, true))|;..hp.ad|
|000024c0| 64 28 68 6f 6d 65 6e 6f | 20 20 3d 20 6e 65 77 20 |d(homeno| = new |
|000024d0| 43 68 65 63 6b 62 6f 78 | 28 22 4e 6f 22 2c 20 68 |Checkbox|("No", h|
|000024e0| 67 2c 20 66 61 6c 73 65 | 29 29 3b 0a 09 72 69 67 |g, false|));..rig|
|000024f0| 68 74 2e 61 64 64 28 68 | 70 29 3b 0a 09 74 6f 70 |ht.add(h|p);..top|
|00002500| 2e 61 64 64 28 22 43 65 | 6e 74 65 72 22 2c 72 69 |.add("Ce|nter",ri|
|00002510| 67 68 74 29 3b 0a 09 61 | 64 64 28 22 4e 6f 72 74 |ght);..a|dd("Nort|
|00002520| 68 22 2c 74 6f 70 29 3b | 0a 09 50 61 6e 65 6c 20 |h",top);|..Panel |
|00002530| 62 6f 74 20 3d 20 6e 65 | 77 20 50 61 6e 65 6c 28 |bot = ne|w Panel(|
|00002540| 29 3b 0a 09 62 6f 74 2e | 73 65 74 4c 61 79 6f 75 |);..bot.|setLayou|
|00002550| 74 28 6e 65 77 20 46 6c | 6f 77 4c 61 79 6f 75 74 |t(new Fl|owLayout|
|00002560| 28 46 6c 6f 77 4c 61 79 | 6f 75 74 2e 52 49 47 48 |(FlowLay|out.RIGH|
|00002570| 54 29 29 3b 0a 09 62 6f | 74 2e 61 64 64 28 6f 6b |T));..bo|t.add(ok|
|00002580| 20 3d 20 6e 65 77 20 42 | 75 74 74 6f 6e 28 22 4f | = new B|utton("O|
|00002590| 6b 22 29 29 3b 0a 09 62 | 6f 74 2e 61 64 64 28 63 |k"));..b|ot.add(c|
|000025a0| 61 6e 63 65 6c 20 3d 20 | 6e 65 77 20 42 75 74 74 |ancel = |new Butt|
|000025b0| 6f 6e 28 22 43 61 6e 63 | 65 6c 22 29 29 3b 0a 09 |on("Canc|el"));..|
|000025c0| 61 64 64 28 22 53 6f 75 | 74 68 22 2c 62 6f 74 29 |add("Sou|th",bot)|
|000025d0| 3b 0a 09 73 65 74 54 69 | 74 6c 65 28 22 55 73 65 |;..setTi|tle("Use|
|000025e0| 72 20 64 65 74 61 69 6c | 73 22 29 3b 0a 09 70 61 |r detail|s");..pa|
|000025f0| 63 6b 28 29 3b 0a 09 73 | 68 6f 77 28 29 3b 0a 09 |ck();..s|how();..|
|00002600| 7d 0a 0a 09 2f 2f 20 43 | 72 65 61 74 65 20 61 20 |}...// C|reate a |
|00002610| 72 65 71 75 65 73 74 6f | 72 20 66 6f 72 20 65 64 |requesto|r for ed|
|00002620| 69 74 69 6e 67 20 61 6e | 20 65 78 69 73 74 69 6e |iting an| existin|
|00002630| 67 20 75 73 65 72 0a 09 | 55 73 65 72 45 64 69 74 |g user..|UserEdit|
|00002640| 52 65 71 75 65 73 74 6f | 72 28 55 73 65 72 73 50 |Requesto|r(UsersP|
|00002650| 61 6e 65 6c 20 70 2c 20 | 69 6e 74 20 73 29 0a 09 |anel p, |int s)..|
|00002660| 7b 0a 09 74 68 69 73 28 | 70 29 3b 0a 09 73 65 6c |{..this(|p);..sel|
|00002670| 20 3d 20 73 3b 0a 09 4a | 46 53 75 73 65 72 20 75 | = s;..J|FSuser u|
|00002680| 20 3d 20 28 4a 46 53 75 | 73 65 72 29 70 61 72 65 | = (JFSu|ser)pare|
|00002690| 6e 74 2e 75 73 65 72 73 | 2e 65 6c 65 6d 65 6e 74 |nt.users|.element|
|000026a0| 41 74 28 73 65 6c 29 3b | 0a 09 6e 61 6d 65 2e 73 |At(sel);|..name.s|
|000026b0| 65 74 54 65 78 74 28 75 | 2e 6e 61 6d 65 29 3b 0a |etText(u|.name);.|
|000026c0| 09 6e 61 6d 65 2e 73 65 | 74 45 64 69 74 61 62 6c |.name.se|tEditabl|
|000026d0| 65 28 66 61 6c 73 65 29 | 3b 0a 09 72 65 61 6c 2e |e(false)|;..real.|
|000026e0| 73 65 74 54 65 78 74 28 | 75 2e 72 65 61 6c 6e 61 |setText(|u.realna|
|000026f0| 6d 65 29 3b 0a 09 70 61 | 73 73 77 6f 72 64 2e 73 |me);..pa|ssword.s|
|00002700| 65 74 54 65 78 74 28 75 | 2e 70 61 73 73 77 6f 72 |etText(u|.passwor|
|00002710| 64 29 3b 0a 09 68 6f 6d | 65 64 69 72 2e 73 65 74 |d);..hom|edir.set|
|00002720| 54 65 78 74 28 75 2e 68 | 6f 6d 65 29 3b 0a 09 53 |Text(u.h|ome);..S|
|00002730| 74 72 69 6e 67 20 67 20 | 3d 20 22 22 3b 0a 09 66 |tring g |= "";..f|
|00002740| 6f 72 28 69 6e 74 20 69 | 3d 30 3b 20 69 3c 75 2e |or(int i|=0; i<u.|
|00002750| 67 72 6f 75 70 73 2e 73 | 69 7a 65 28 29 3b 20 69 |groups.s|ize(); i|
|00002760| 2b 2b 29 20 7b 0a 09 09 | 67 20 2b 3d 20 28 53 74 |++) {...|g += (St|
|00002770| 72 69 6e 67 29 75 2e 67 | 72 6f 75 70 73 2e 65 6c |ring)u.g|roups.el|
|00002780| 65 6d 65 6e 74 41 74 28 | 69 29 3b 0a 09 09 69 66 |ementAt(|i);...if|
|00002790| 20 28 69 20 21 3d 20 75 | 2e 67 72 6f 75 70 73 2e | (i != u|.groups.|
|000027a0| 73 69 7a 65 28 29 2d 31 | 29 0a 09 09 09 67 20 2b |size()-1|)....g +|
|000027b0| 3d 20 22 2c 22 3b 0a 09 | 09 7d 0a 09 67 72 6f 75 |= ",";..|.}..grou|
|000027c0| 70 73 2e 73 65 74 54 65 | 78 74 28 67 29 3b 0a 09 |ps.setTe|xt(g);..|
|000027d0| 7d 0a 0a 09 70 75 62 6c | 69 63 20 62 6f 6f 6c 65 |}...publ|ic boole|
|000027e0| 61 6e 20 68 61 6e 64 6c | 65 45 76 65 6e 74 28 45 |an handl|eEvent(E|
|000027f0| 76 65 6e 74 20 65 76 74 | 29 0a 09 7b 0a 09 69 66 |vent evt|)..{..if|
|00002800| 20 28 65 76 74 2e 69 64 | 20 3d 3d 20 45 76 65 6e | (evt.id| == Even|
|00002810| 74 2e 57 49 4e 44 4f 57 | 5f 44 45 53 54 52 4f 59 |t.WINDOW|_DESTROY|
|00002820| 20 7c 7c 0a 09 20 20 20 | 20 65 76 74 2e 69 64 20 | ||.. | evt.id |
|00002830| 3d 3d 20 45 76 65 6e 74 | 2e 41 43 54 49 4f 4e 5f |== Event|.ACTION_|
|00002840| 45 56 45 4e 54 20 26 26 | 20 65 76 74 2e 74 61 72 |EVENT &&| evt.tar|
|00002850| 67 65 74 20 3d 3d 20 63 | 61 6e 63 65 6c 29 0a 09 |get == c|ancel)..|
|00002860| 09 64 69 73 70 6f 73 65 | 28 29 3b 0a 09 65 6c 73 |.dispose|();..els|
|00002870| 65 20 69 66 20 28 65 76 | 74 2e 69 64 20 3d 3d 20 |e if (ev|t.id == |
|00002880| 45 76 65 6e 74 2e 41 43 | 54 49 4f 4e 5f 45 56 45 |Event.AC|TION_EVE|
|00002890| 4e 54 20 26 26 20 65 76 | 74 2e 74 61 72 67 65 74 |NT && ev|t.target|
|000028a0| 20 3d 3d 20 6f 6b 29 20 | 7b 0a 09 09 2f 2f 20 41 | == ok) |{...// A|
|000028b0| 64 64 20 6f 72 20 75 70 | 64 61 74 65 20 74 68 69 |dd or up|date thi|
|000028c0| 73 20 75 73 65 72 0a 0a | 09 09 2f 2f 20 42 75 69 |s user..|..// Bui|
|000028d0| 6c 64 20 61 20 6e 65 77 | 20 75 73 65 72 20 73 74 |ld a new| user st|
|000028e0| 72 75 63 74 75 72 65 0a | 09 09 4a 46 53 75 73 65 |ructure.|..JFSuse|
|000028f0| 72 20 6e 75 20 3d 20 6e | 65 77 20 4a 46 53 75 73 |r nu = n|ew JFSus|
|00002900| 65 72 28 29 3b 0a 09 09 | 6e 75 2e 6e 61 6d 65 20 |er();...|nu.name |
|00002910| 3d 20 6e 61 6d 65 2e 67 | 65 74 54 65 78 74 28 29 |= name.g|etText()|
|00002920| 3b 0a 09 09 69 66 20 28 | 6e 75 2e 6e 61 6d 65 2e |;...if (|nu.name.|
|00002930| 74 72 69 6d 28 29 2e 6c | 65 6e 67 74 68 28 29 20 |trim().l|ength() |
|00002940| 3d 3d 20 30 29 20 7b 0a | 09 09 09 6e 65 77 20 45 |== 0) {.|...new E|
|00002950| 72 72 6f 72 57 69 6e 64 | 6f 77 28 22 45 6d 70 74 |rrorWind|ow("Empt|
|00002960| 79 20 75 73 65 72 6e 61 | 6d 65 22 29 3b 0a 09 09 |y userna|me");...|
|00002970| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0a 09 09 |.return |true;...|
|00002980| 09 7d 0a 09 09 6e 75 2e | 72 65 61 6c 6e 61 6d 65 |.}...nu.|realname|
|00002990| 20 3d 20 72 65 61 6c 2e | 67 65 74 54 65 78 74 28 | = real.|getText(|
|000029a0| 29 3b 0a 09 09 6e 75 2e | 70 61 73 73 77 6f 72 64 |);...nu.|password|
|000029b0| 20 3d 20 70 61 73 73 77 | 6f 72 64 2e 67 65 74 54 | = passw|ord.getT|
|000029c0| 65 78 74 28 29 3b 0a 09 | 09 6e 75 2e 68 6f 6d 65 |ext();..|.nu.home|
|000029d0| 20 3d 20 68 6f 6d 65 64 | 69 72 2e 67 65 74 54 65 | = homed|ir.getTe|
|000029e0| 78 74 28 29 3b 0a 09 09 | 53 74 72 69 6e 67 53 70 |xt();...|StringSp|
|000029f0| 6c 69 74 74 65 72 20 74 | 6f 6b 20 3d 20 6e 65 77 |litter t|ok = new|
|00002a00| 20 53 74 72 69 6e 67 53 | 70 6c 69 74 74 65 72 28 | StringS|plitter(|
|00002a10| 67 72 6f 75 70 73 2e 67 | 65 74 54 65 78 74 28 29 |groups.g|etText()|
|00002a20| 2c 27 2c 27 29 3b 0a 09 | 09 53 74 72 69 6e 67 20 |,',');..|.String |
|00002a30| 67 72 3b 0a 09 09 77 68 | 69 6c 65 28 28 67 72 20 |gr;...wh|ile((gr |
|00002a40| 3d 20 74 6f 6b 2e 6e 65 | 78 74 54 6f 6b 65 6e 28 |= tok.ne|xtToken(|
|00002a50| 29 29 20 21 3d 20 6e 75 | 6c 6c 29 20 7b 0a 09 09 |)) != nu|ll) {...|
|00002a60| 09 2f 2f 20 43 68 65 63 | 6b 20 61 6e 64 20 61 64 |.// Chec|k and ad|
|00002a70| 64 20 65 61 63 68 20 67 | 72 6f 75 70 20 6e 61 6d |d each g|roup nam|
|00002a80| 65 0a 09 09 09 69 66 20 | 28 67 72 2e 74 72 69 6d |e....if |(gr.trim|
|00002a90| 28 29 2e 6c 65 6e 67 74 | 68 28 29 20 3d 3d 20 30 |().lengt|h() == 0|
|00002aa0| 29 0a 09 09 09 09 63 6f | 6e 74 69 6e 75 65 3b 09 |).....co|ntinue;.|
|00002ab0| 2f 2f 20 75 73 65 6c 65 | 73 73 20 73 74 72 69 6e |// usele|ss strin|
|00002ac0| 67 0a 09 09 09 66 6f 72 | 28 69 6e 74 20 69 3d 30 |g....for|(int i=0|
|00002ad0| 3b 20 69 3c 70 61 72 65 | 6e 74 2e 75 73 65 72 73 |; i<pare|nt.users|
|00002ae0| 2e 73 69 7a 65 28 29 3b | 20 69 2b 2b 29 20 7b 0a |.size();| i++) {.|
|00002af0| 09 09 09 09 4a 46 53 75 | 73 65 72 20 65 75 20 3d |....JFSu|ser eu =|
|00002b00| 20 28 4a 46 53 75 73 65 | 72 29 70 61 72 65 6e 74 | (JFSuse|r)parent|
|00002b10| 2e 75 73 65 72 73 2e 65 | 6c 65 6d 65 6e 74 41 74 |.users.e|lementAt|
|00002b20| 28 69 29 3b 0a 09 09 09 | 09 69 66 20 28 65 75 2e |(i);....|.if (eu.|
|00002b30| 6e 61 6d 65 2e 65 71 75 | 61 6c 73 28 67 72 29 29 |name.equ|als(gr))|
|00002b40| 20 7b 0a 09 09 09 09 09 | 2f 2f 20 6f 68 20 6e 6f | {......|// oh no|
|00002b50| 21 20 61 20 75 73 65 72 | 20 77 69 74 68 20 74 68 |! a user| with th|
|00002b60| 69 73 20 67 72 6f 75 70 | 20 6e 61 6d 65 0a 09 09 |is group| name...|
|00002b70| 09 09 09 2f 2f 20 61 6c | 72 65 61 64 79 20 65 78 |...// al|ready ex|
|00002b80| 69 73 74 73 2e 0a 09 09 | 09 09 09 6e 65 77 20 45 |ists....|...new E|
|00002b90| 72 72 6f 72 57 69 6e 64 | 6f 77 28 22 54 68 65 20 |rrorWind|ow("The |
|00002ba0| 67 72 6f 75 70 20 6e 61 | 6d 65 20 22 2b 67 72 2b |group na|me "+gr+|
|00002bb0| 0a 09 09 09 09 09 09 09 | 22 20 63 61 6e 6e 6f 74 |........|" cannot|
|00002bc0| 20 62 65 20 75 73 65 64 | 2c 20 61 73 20 22 2b 0a | be used|, as "+.|
|00002bd0| 09 09 09 09 09 09 09 22 | 69 74 20 62 65 6c 6f 6e |......."|it belon|
|00002be0| 67 73 20 74 6f 20 61 20 | 75 73 65 72 22 29 3b 0a |gs to a |user");.|
|00002bf0| 09 09 09 09 09 72 65 74 | 75 72 6e 20 74 72 75 65 |.....ret|urn true|
|00002c00| 3b 0a 09 09 09 09 09 7d | 0a 09 09 09 09 7d 0a 09 |;......}|.....}..|
|00002c10| 09 09 6e 75 2e 67 72 6f | 75 70 73 2e 61 64 64 45 |..nu.gro|ups.addE|
|00002c20| 6c 65 6d 65 6e 74 28 67 | 72 29 3b 0a 09 09 09 7d |lement(g|r);....}|
|00002c30| 0a 0a 09 09 2f 2f 20 54 | 72 79 20 74 6f 20 66 69 |....// T|ry to fi|
|00002c40| 6e 64 20 61 20 75 73 65 | 72 20 77 69 74 68 20 74 |nd a use|r with t|
|00002c50| 68 69 73 20 6e 61 6d 65 | 0a 09 09 4a 46 53 75 73 |his name|...JFSus|
|00002c60| 65 72 20 65 78 69 73 74 | 69 6e 67 20 3d 20 6e 75 |er exist|ing = nu|
|00002c70| 6c 6c 3b 0a 09 09 66 6f | 72 28 69 6e 74 20 69 3d |ll;...fo|r(int i=|
|00002c80| 30 3b 20 69 3c 70 61 72 | 65 6e 74 2e 75 73 65 72 |0; i<par|ent.user|
|00002c90| 73 2e 73 69 7a 65 28 29 | 3b 20 69 2b 2b 29 20 7b |s.size()|; i++) {|
|00002ca0| 0a 09 09 09 4a 46 53 75 | 73 65 72 20 65 75 20 3d |....JFSu|ser eu =|
|00002cb0| 20 28 4a 46 53 75 73 65 | 72 29 70 61 72 65 6e 74 | (JFSuse|r)parent|
|00002cc0| 2e 75 73 65 72 73 2e 65 | 6c 65 6d 65 6e 74 41 74 |.users.e|lementAt|
|00002cd0| 28 69 29 3b 0a 09 09 09 | 69 66 20 28 65 75 2e 6e |(i);....|if (eu.n|
|00002ce0| 61 6d 65 2e 65 71 75 61 | 6c 73 28 6e 75 2e 6e 61 |ame.equa|ls(nu.na|
|00002cf0| 6d 65 29 29 0a 09 09 09 | 09 65 78 69 73 74 69 6e |me))....|.existin|
|00002d00| 67 20 3d 20 65 75 3b 0a | 09 09 09 7d 0a 0a 09 09 |g = eu;.|...}....|
|00002d10| 69 66 20 28 73 65 6c 20 | 3c 20 30 29 20 7b 0a 09 |if (sel |< 0) {..|
|00002d20| 09 09 2f 2f 20 43 72 65 | 61 74 65 20 61 20 6e 65 |..// Cre|ate a ne|
|00002d30| 77 20 75 73 65 72 0a 09 | 09 09 69 66 20 28 65 78 |w user..|..if (ex|
|00002d40| 69 73 74 69 6e 67 20 21 | 3d 20 6e 75 6c 6c 29 20 |isting !|= null) |
|00002d50| 7b 0a 09 09 09 09 6e 65 | 77 20 45 72 72 6f 72 57 |{.....ne|w ErrorW|
|00002d60| 69 6e 64 6f 77 28 22 41 | 20 75 73 65 72 20 77 69 |indow("A| user wi|
|00002d70| 74 68 20 74 68 65 20 6e | 61 6d 65 20 22 2b 0a 09 |th the n|ame "+..|
|00002d80| 09 09 09 09 09 6e 75 2e | 6e 61 6d 65 2b 22 20 61 |.....nu.|name+" a|
|00002d90| 6c 72 65 61 64 79 20 65 | 78 69 73 74 73 22 29 3b |lready e|xists");|
|00002da0| 0a 09 09 09 09 72 65 74 | 75 72 6e 20 74 72 75 65 |.....ret|urn true|
|00002db0| 3b 0a 09 09 09 09 7d 0a | 09 09 09 7d 0a 09 09 65 |;.....}.|...}...e|
|00002dc0| 6c 73 65 20 7b 0a 09 09 | 09 2f 2f 20 6d 6f 64 69 |lse {...|.// modi|
|00002dd0| 66 79 20 61 6e 20 65 78 | 69 73 74 69 6e 67 20 6f |fy an ex|isting o|
|00002de0| 6e 65 0a 09 09 09 70 61 | 72 65 6e 74 2e 75 73 65 |ne....pa|rent.use|
|00002df0| 72 73 2e 72 65 6d 6f 76 | 65 45 6c 65 6d 65 6e 74 |rs.remov|eElement|
|00002e00| 28 65 78 69 73 74 69 6e | 67 29 3b 0a 09 09 09 7d |(existin|g);....}|
|00002e10| 0a 09 09 70 61 72 65 6e | 74 2e 75 73 65 72 73 2e |...paren|t.users.|
|00002e20| 61 64 64 45 6c 65 6d 65 | 6e 74 28 6e 75 29 3b 0a |addEleme|nt(nu);.|
|00002e30| 09 09 70 61 72 65 6e 74 | 2e 66 69 6c 6c 28 29 3b |..parent|.fill();|
|00002e40| 0a 09 09 70 61 72 65 6e | 74 2e 77 72 69 74 65 28 |...paren|t.write(|
|00002e50| 29 3b 0a 0a 09 09 2f 2f | 20 43 72 65 61 74 65 20 |);....//| Create |
|00002e60| 68 6f 6d 65 20 64 69 72 | 65 63 74 6f 72 79 20 69 |home dir|ectory i|
|00002e70| 66 20 6e 65 65 64 65 64 | 0a 09 09 69 66 20 28 68 |f needed|...if (h|
|00002e80| 6f 6d 65 79 65 73 2e 67 | 65 74 53 74 61 74 65 28 |omeyes.g|etState(|
|00002e90| 29 29 20 7b 0a 09 09 09 | 62 6f 6f 6c 65 61 6e 20 |)) {....|boolean |
|00002ea0| 6d 61 64 65 20 3d 20 74 | 72 75 65 3b 0a 09 09 09 |made = t|rue;....|
|00002eb0| 74 72 79 20 70 61 72 65 | 6e 74 2e 63 6c 69 65 6e |try pare|nt.clien|
|00002ec0| 74 2e 6d 6b 64 69 72 28 | 68 6f 6d 65 64 69 72 2e |t.mkdir(|homedir.|
|00002ed0| 67 65 74 54 65 78 74 28 | 29 29 3b 0a 09 09 09 63 |getText(|));....c|
|00002ee0| 61 74 63 68 28 52 65 71 | 75 65 73 74 45 78 63 65 |atch(Req|uestExce|
|00002ef0| 70 74 69 6f 6e 20 65 29 | 0a 09 09 09 09 6d 61 64 |ption e)|.....mad|
|00002f00| 65 20 3d 20 66 61 6c 73 | 65 3b 0a 09 09 09 69 66 |e = fals|e;....if|
|00002f10| 20 28 6d 61 64 65 29 20 | 7b 0a 09 09 09 09 2f 2f | (made) |{.....//|
|00002f20| 20 63 68 6d 6f 64 20 68 | 6f 6d 65 20 64 69 72 0a | chmod h|ome dir.|
|00002f30| 09 09 09 09 74 72 79 20 | 70 61 72 65 6e 74 2e 63 |....try |parent.c|
|00002f40| 6c 69 65 6e 74 2e 63 68 | 6d 6f 64 28 68 6f 6d 65 |lient.ch|mod(home|
|00002f50| 64 69 72 2e 67 65 74 54 | 65 78 74 28 29 2c 0a 09 |dir.getT|ext(),..|
|00002f60| 09 09 09 09 09 09 6e 61 | 6d 65 2e 67 65 74 54 65 |......na|me.getTe|
|00002f70| 78 74 28 29 2c 20 22 72 | 77 70 22 29 3b 0a 09 09 |xt(), "r|wp");...|
|00002f80| 09 09 63 61 74 63 68 28 | 52 65 71 75 65 73 74 45 |..catch(|RequestE|
|00002f90| 78 63 65 70 74 69 6f 6e | 20 65 29 3b 0a 09 09 09 |xception| e);....|
|00002fa0| 09 7d 0a 09 09 09 7d 0a | 0a 09 09 64 69 73 70 6f |.}....}.|...dispo|
|00002fb0| 73 65 28 29 3b 0a 09 09 | 7d 0a 09 72 65 74 75 72 |se();...|}..retur|
|00002fc0| 6e 20 73 75 70 65 72 2e | 68 61 6e 64 6c 65 45 76 |n super.|handleEv|
|00002fd0| 65 6e 74 28 65 76 74 29 | 3b 0a 09 7d 0a 7d 0a 0a |ent(evt)|;..}.}..|
|00002fe0| 0a 2f 2f 20 50 72 69 6e | 74 65 72 73 50 61 6e 65 |.// Prin|tersPane|
|00002ff0| 6c 0a 2f 2f 20 44 69 73 | 70 6c 61 79 73 20 61 20 |l.// Dis|plays a |
|00003000| 6c 69 73 74 20 6f 66 20 | 61 6c 6c 20 70 72 69 6e |list of |all prin|
|00003010| 74 65 72 73 20 66 72 6f | 6d 20 2f 65 74 63 2f 70 |ters fro|m /etc/p|
|00003020| 72 69 6e 74 65 72 73 2c | 20 66 6f 72 20 61 64 64 |rinters,| for add|
|00003030| 69 74 69 6f 6e 2c 0a 2f | 2f 20 6d 6f 64 69 66 69 |ition,./|/ modifi|
|00003040| 63 61 74 69 6f 6e 20 61 | 6e 64 20 64 65 6c 65 74 |cation a|nd delet|
|00003050| 69 6f 6e 0a 63 6c 61 73 | 73 20 50 72 69 6e 74 65 |ion.clas|s Printe|
|00003060| 72 73 50 61 6e 65 6c 20 | 65 78 74 65 6e 64 73 20 |rsPanel |extends |
|00003070| 50 61 6e 65 6c 0a 7b 0a | 09 4a 46 53 63 6c 69 65 |Panel.{.|.JFSclie|
|00003080| 6e 74 20 63 6c 69 65 6e | 74 3b 0a 09 56 65 63 74 |nt clien|t;..Vect|
|00003090| 6f 72 20 6e 61 6d 65 20 | 3d 20 6e 65 77 20 56 65 |or name |= new Ve|
|000030a0| 63 74 6f 72 28 29 2c 20 | 74 79 70 65 20 3d 20 6e |ctor(), |type = n|
|000030b0| 65 77 20 56 65 63 74 6f | 72 28 29 2c 0a 09 20 20 |ew Vecto|r(),.. |
|000030c0| 20 20 20 20 20 64 65 73 | 63 20 3d 20 6e 65 77 20 | des|c = new |
|000030d0| 56 65 63 74 6f 72 28 29 | 2c 20 63 6f 6d 6d 20 3d |Vector()|, comm =|
|000030e0| 20 6e 65 77 20 56 65 63 | 74 6f 72 28 29 3b 0a 09 | new Vec|tor();..|
|000030f0| 44 6f 75 62 6c 65 4c 69 | 73 74 50 61 6e 65 6c 20 |DoubleLi|stPanel |
|00003100| 6c 69 73 74 3b 0a 09 42 | 75 74 74 6f 6e 20 61 64 |list;..B|utton ad|
|00003110| 64 2c 64 65 6c 2c 6d 6f | 64 3b 0a 0a 09 50 72 69 |d,del,mo|d;...Pri|
|00003120| 6e 74 65 72 73 50 61 6e | 65 6c 28 29 0a 09 7b 0a |ntersPan|el()..{.|
|00003130| 09 73 65 74 4c 61 79 6f | 75 74 28 6e 65 77 20 42 |.setLayo|ut(new B|
|00003140| 6f 72 64 65 72 4c 61 79 | 6f 75 74 28 29 29 3b 0a |orderLay|out());.|
|00003150| 09 61 64 64 28 22 43 65 | 6e 74 65 72 22 2c 6c 69 |.add("Ce|nter",li|
|00003160| 73 74 20 3d 20 6e 65 77 | 20 44 6f 75 62 6c 65 4c |st = new| DoubleL|
|00003170| 69 73 74 50 61 6e 65 6c | 28 22 4e 61 6d 65 22 2c |istPanel|("Name",|
|00003180| 22 44 65 73 63 72 69 70 | 74 69 6f 6e 22 29 29 3b |"Descrip|tion"));|
|00003190| 0a 09 50 61 6e 65 6c 20 | 74 6f 70 20 3d 20 6e 65 |..Panel |top = ne|
|000031a0| 77 20 50 61 6e 65 6c 28 | 29 3b 0a 09 74 6f 70 2e |w Panel(|);..top.|
|000031b0| 73 65 74 4c 61 79 6f 75 | 74 28 6e 65 77 20 46 6c |setLayou|t(new Fl|
|000031c0| 6f 77 4c 61 79 6f 75 74 | 28 46 6c 6f 77 4c 61 79 |owLayout|(FlowLay|
|000031d0| 6f 75 74 2e 4c 45 46 54 | 29 29 3b 0a 09 74 6f 70 |out.LEFT|));..top|
|000031e0| 2e 61 64 64 28 61 64 64 | 20 3d 20 6e 65 77 20 42 |.add(add| = new B|
|000031f0| 75 74 74 6f 6e 28 22 41 | 64 64 22 29 29 3b 0a 09 |utton("A|dd"));..|
|00003200| 74 6f 70 2e 61 64 64 28 | 64 65 6c 20 3d 20 6e 65 |top.add(|del = ne|
|00003210| 77 20 42 75 74 74 6f 6e | 28 22 44 65 6c 65 74 65 |w Button|("Delete|
|00003220| 22 29 29 3b 0a 09 74 6f | 70 2e 61 64 64 28 6d 6f |"));..to|p.add(mo|
|00003230| 64 20 3d 20 6e 65 77 20 | 42 75 74 74 6f 6e 28 22 |d = new |Button("|
|00003240| 4d 6f 64 69 66 79 22 29 | 29 3b 0a 09 61 64 64 28 |Modify")|);..add(|
|00003250| 22 4e 6f 72 74 68 22 2c | 74 6f 70 29 3b 0a 09 7d |"North",|top);..}|
|00003260| 0a 0a 09 2f 2f 20 63 6f | 6e 6e 65 63 74 0a 09 2f |...// co|nnect../|
|00003270| 2f 20 52 65 61 64 20 61 | 6e 64 20 64 69 73 70 6c |/ Read a|nd displ|
|00003280| 61 79 20 61 20 6c 69 73 | 74 20 6f 66 20 70 72 69 |ay a lis|t of pri|
|00003290| 6e 74 65 72 73 20 66 72 | 6f 6d 20 74 68 65 20 73 |nters fr|om the s|
|000032a0| 65 72 76 65 72 0a 09 76 | 6f 69 64 20 63 6f 6e 6e |erver..v|oid conn|
|000032b0| 65 63 74 28 4a 46 53 63 | 6c 69 65 6e 74 20 63 29 |ect(JFSc|lient c)|
|000032c0| 0a 09 7b 0a 09 63 6c 69 | 65 6e 74 20 3d 20 63 3b |..{..cli|ent = c;|
|000032d0| 0a 09 74 72 79 20 63 6c | 69 65 6e 74 2e 67 65 74 |..try cl|ient.get|
|000032e0| 70 72 69 6e 74 65 72 73 | 28 6e 61 6d 65 2c 20 74 |printers|(name, t|
|000032f0| 79 70 65 2c 20 64 65 73 | 63 2c 20 63 6f 6d 6d 29 |ype, des|c, comm)|
|00003300| 3b 0a 09 63 61 74 63 68 | 28 52 65 71 75 65 73 74 |;..catch|(Request|
|00003310| 45 78 63 65 70 74 69 6f | 6e 20 65 29 20 7b 0a 09 |Exceptio|n e) {..|
|00003320| 09 6e 65 77 20 45 72 72 | 6f 72 57 69 6e 64 6f 77 |.new Err|orWindow|
|00003330| 28 22 43 6f 75 6c 64 20 | 6e 6f 74 20 72 65 61 64 |("Could |not read|
|00003340| 20 2f 65 74 63 2f 70 72 | 69 6e 74 65 72 73 20 3a | /etc/pr|inters :|
|00003350| 20 22 2b 0a 09 09 09 09 | 65 2e 67 65 74 4d 65 73 | "+.....|e.getMes|
|00003360| 73 61 67 65 28 29 29 3b | 0a 09 09 72 65 74 75 72 |sage());|...retur|
|00003370| 6e 3b 0a 09 09 7d 0a 09 | 66 69 6c 6c 28 29 3b 0a |n;...}..|fill();.|
|00003380| 09 7d 0a 0a 09 2f 2f 20 | 66 69 6c 6c 0a 09 2f 2f |.}...// |fill..//|
|00003390| 20 46 69 6c 6c 20 74 68 | 65 20 6c 69 73 74 20 77 | Fill th|e list w|
|000033a0| 69 74 68 20 6b 6e 6f 77 | 6e 20 70 72 69 6e 74 65 |ith know|n printe|
|000033b0| 72 73 0a 09 76 6f 69 64 | 20 66 69 6c 6c 28 29 0a |rs..void| fill().|
|000033c0| 09 7b 0a 09 6c 69 73 74 | 2e 63 6c 65 61 72 28 29 |.{..list|.clear()|
|000033d0| 3b 0a 09 66 6f 72 28 69 | 6e 74 20 69 3d 30 3b 20 |;..for(i|nt i=0; |
|000033e0| 69 3c 6e 61 6d 65 2e 73 | 69 7a 65 28 29 3b 20 69 |i<name.s|ize(); i|
|000033f0| 2b 2b 29 0a 09 09 6c 69 | 73 74 2e 61 64 64 49 74 |++)...li|st.addIt|
|00003400| 65 6d 28 28 53 74 72 69 | 6e 67 29 6e 61 6d 65 2e |em((Stri|ng)name.|
|00003410| 65 6c 65 6d 65 6e 74 41 | 74 28 69 29 2c 0a 09 09 |elementA|t(i),...|
|00003420| 09 20 20 20 20 20 28 53 | 74 72 69 6e 67 29 64 65 |. (S|tring)de|
|00003430| 73 63 2e 65 6c 65 6d 65 | 6e 74 41 74 28 69 29 29 |sc.eleme|ntAt(i))|
|00003440| 3b 0a 09 7d 0a 0a 09 2f | 2f 20 77 72 69 74 65 0a |;..}.../|/ write.|
|00003450| 09 2f 2f 20 4f 75 74 70 | 75 74 20 74 68 65 20 6c |.// Outp|ut the l|
|00003460| 69 73 74 20 6f 66 20 70 | 72 69 6e 74 65 72 73 20 |ist of p|rinters |
|00003470| 74 6f 20 2f 65 74 63 2f | 70 72 69 6e 74 65 72 73 |to /etc/|printers|
|00003480| 0a 09 76 6f 69 64 20 77 | 72 69 74 65 28 29 0a 09 |..void w|rite()..|
|00003490| 7b 0a 09 42 75 66 66 65 | 72 4f 75 74 70 75 74 53 |{..Buffe|rOutputS|
|000034a0| 74 72 65 61 6d 20 62 75 | 66 20 3d 20 6e 65 77 20 |tream bu|f = new |
|000034b0| 42 75 66 66 65 72 4f 75 | 74 70 75 74 53 74 72 65 |BufferOu|tputStre|
|000034c0| 61 6d 28 29 3b 0a 09 66 | 6f 72 28 69 6e 74 20 69 |am();..f|or(int i|
|000034d0| 3d 30 3b 20 69 3c 6e 61 | 6d 65 2e 73 69 7a 65 28 |=0; i<na|me.size(|
|000034e0| 29 3b 20 69 2b 2b 29 20 | 7b 0a 09 09 53 74 72 69 |); i++) |{...Stri|
|000034f0| 6e 67 4a 6f 69 6e 65 72 | 20 6a 20 3d 20 6e 65 77 |ngJoiner| j = new|
|00003500| 20 53 74 72 69 6e 67 4a | 6f 69 6e 65 72 28 27 3a | StringJ|oiner(':|
|00003510| 27 29 3b 0a 09 09 6a 2e | 61 64 64 28 28 53 74 72 |');...j.|add((Str|
|00003520| 69 6e 67 29 6e 61 6d 65 | 2e 65 6c 65 6d 65 6e 74 |ing)name|.element|
|00003530| 41 74 28 69 29 29 3b 0a | 09 09 6a 2e 61 64 64 28 |At(i));.|..j.add(|
|00003540| 28 53 74 72 69 6e 67 29 | 74 79 70 65 2e 65 6c 65 |(String)|type.ele|
|00003550| 6d 65 6e 74 41 74 28 69 | 29 29 3b 0a 09 09 6a 2e |mentAt(i|));...j.|
|00003560| 61 64 64 28 28 53 74 72 | 69 6e 67 29 64 65 73 63 |add((Str|ing)desc|
|00003570| 2e 65 6c 65 6d 65 6e 74 | 41 74 28 69 29 29 3b 0a |.element|At(i));.|
|00003580| 09 09 6a 2e 61 64 64 28 | 28 53 74 72 69 6e 67 29 |..j.add(|(String)|
|00003590| 63 6f 6d 6d 2e 65 6c 65 | 6d 65 6e 74 41 74 28 69 |comm.ele|mentAt(i|
|000035a0| 29 29 3b 0a 09 09 62 75 | 66 2e 70 75 74 73 28 6a |));...bu|f.puts(j|
|000035b0| 2e 74 6f 53 74 72 69 6e | 67 28 29 29 3b 0a 09 09 |.toStrin|g());...|
|000035c0| 7d 0a 09 74 72 79 20 63 | 6c 69 65 6e 74 2e 70 75 |}..try c|lient.pu|
|000035d0| 74 28 22 2f 65 74 63 2f | 70 72 69 6e 74 65 72 73 |t("/etc/|printers|
|000035e0| 22 2c 20 30 2c 20 62 75 | 66 2e 67 65 74 61 72 72 |", 0, bu|f.getarr|
|000035f0| 61 79 28 29 2c 20 22 74 | 65 78 74 2f 70 6c 61 69 |ay(), "t|ext/plai|
|00003600| 6e 22 29 3b 0a 09 63 61 | 74 63 68 28 52 65 71 75 |n");..ca|tch(Requ|
|00003610| 65 73 74 45 78 63 65 70 | 74 69 6f 6e 20 65 29 0a |estExcep|tion e).|
|00003620| 09 09 6e 65 77 20 45 72 | 72 6f 72 57 69 6e 64 6f |..new Er|rorWindo|
|00003630| 77 28 22 46 61 69 6c 65 | 64 20 74 6f 20 77 72 69 |w("Faile|d to wri|
|00003640| 74 65 20 74 6f 20 2f 65 | 74 63 2f 70 72 69 6e 74 |te to /e|tc/print|
|00003650| 65 72 20 3a 20 22 2b 0a | 09 09 09 09 65 2e 67 65 |er : "+.|....e.ge|
|00003660| 74 4d 65 73 73 61 67 65 | 28 29 29 3b 0a 09 7d 0a |tMessage|());..}.|
|00003670| 0a 09 70 75 62 6c 69 63 | 20 62 6f 6f 6c 65 61 6e |..public| boolean|
|00003680| 20 61 63 74 69 6f 6e 28 | 45 76 65 6e 74 20 65 76 | action(|Event ev|
|00003690| 74 2c 20 4f 62 6a 65 63 | 74 20 6f 62 6a 29 0a 09 |t, Objec|t obj)..|
|000036a0| 7b 0a 09 69 6e 74 20 73 | 65 6c 20 3d 20 6c 69 73 |{..int s|el = lis|
|000036b0| 74 2e 73 65 6c 65 63 74 | 65 64 28 29 3b 0a 09 69 |t.select|ed();..i|
|000036c0| 66 20 28 65 76 74 2e 74 | 61 72 67 65 74 20 3d 3d |f (evt.t|arget ==|
|000036d0| 20 61 64 64 29 20 7b 0a | 09 09 2f 2f 20 41 64 64 | add) {.|..// Add|
|000036e0| 20 70 72 69 6e 74 65 72 | 20 62 75 74 74 6f 6e 20 | printer| button |
|000036f0| 63 6c 69 63 6b 65 64 2e | 20 4f 70 65 6e 20 6e 65 |clicked.| Open ne|
|00003700| 77 20 70 72 69 6e 74 65 | 72 20 64 65 74 61 69 6c |w printe|r detail|
|00003710| 73 20 72 65 71 2e 0a 09 | 09 6e 65 77 20 50 72 69 |s req...|.new Pri|
|00003720| 6e 74 65 72 45 64 69 74 | 52 65 71 75 65 73 74 6f |nterEdit|Requesto|
|00003730| 72 28 74 68 69 73 29 3b | 0a 09 09 7d 0a 09 65 6c |r(this);|...}..el|
|00003740| 73 65 20 69 66 20 28 65 | 76 74 2e 74 61 72 67 65 |se if (e|vt.targe|
|00003750| 74 20 3d 3d 20 64 65 6c | 29 20 7b 0a 09 09 2f 2f |t == del|) {...//|
|00003760| 20 44 65 6c 65 74 65 20 | 62 75 74 74 6f 6e 20 63 | Delete |button c|
|00003770| 6c 69 63 6b 65 64 2e 20 | 52 65 6d 6f 76 65 20 73 |licked. |Remove s|
|00003780| 65 6c 65 63 74 65 64 20 | 70 72 69 6e 74 65 72 0a |elected |printer.|
|00003790| 09 09 69 66 20 28 73 65 | 6c 20 3c 20 30 29 20 20 |..if (se|l < 0) |
|000037a0| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0a 09 09 |return f|alse;...|
|000037b0| 6e 61 6d 65 2e 72 65 6d | 6f 76 65 45 6c 65 6d 65 |name.rem|oveEleme|
|000037c0| 6e 74 41 74 28 73 65 6c | 29 3b 0a 09 09 74 79 70 |ntAt(sel|);...typ|
|000037d0| 65 2e 72 65 6d 6f 76 65 | 45 6c 65 6d 65 6e 74 41 |e.remove|ElementA|
|000037e0| 74 28 73 65 6c 29 3b 0a | 09 09 64 65 73 63 2e 72 |t(sel);.|..desc.r|
|000037f0| 65 6d 6f 76 65 45 6c 65 | 6d 65 6e 74 41 74 28 73 |emoveEle|mentAt(s|
|00003800| 65 6c 29 3b 0a 09 09 63 | 6f 6d 6d 2e 72 65 6d 6f |el);...c|omm.remo|
|00003810| 76 65 45 6c 65 6d 65 6e | 74 41 74 28 73 65 6c 29 |veElemen|tAt(sel)|
|00003820| 3b 0a 09 09 66 69 6c 6c | 28 29 3b 0a 09 09 77 72 |;...fill|();...wr|
|00003830| 69 74 65 28 29 3b 0a 09 | 09 7d 0a 09 65 6c 73 65 |ite();..|.}..else|
|00003840| 20 69 66 20 28 65 76 74 | 2e 74 61 72 67 65 74 20 | if (evt|.target |
|00003850| 3d 3d 20 6d 6f 64 20 7c | 7c 0a 09 09 20 65 76 74 |== mod |||... evt|
|00003860| 2e 74 61 72 67 65 74 20 | 3d 3d 20 6c 69 73 74 20 |.target |== list |
|00003870| 26 26 20 28 28 53 74 72 | 69 6e 67 29 65 76 74 2e |&& ((Str|ing)evt.|
|00003880| 61 72 67 29 2e 65 71 75 | 61 6c 73 28 22 44 6f 75 |arg).equ|als("Dou|
|00003890| 62 6c 65 22 29 29 20 7b | 0a 09 09 2f 2f 20 4d 6f |ble")) {|...// Mo|
|000038a0| 64 69 66 79 20 62 75 74 | 74 6f 6e 20 63 6c 69 63 |dify but|ton clic|
|000038b0| 6b 65 64 2e 20 4f 70 65 | 6e 20 72 65 71 75 65 73 |ked. Ope|n reques|
|000038c0| 74 6f 72 20 74 6f 20 65 | 64 69 74 20 70 72 69 6e |tor to e|dit prin|
|000038d0| 74 65 72 0a 09 09 69 66 | 20 28 73 65 6c 20 3c 20 |ter...if| (sel < |
|000038e0| 30 29 20 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |0) retur|n false;|
|000038f0| 0a 09 09 6e 65 77 20 50 | 72 69 6e 74 65 72 45 64 |...new P|rinterEd|
|00003900| 69 74 52 65 71 75 65 73 | 74 6f 72 28 74 68 69 73 |itReques|tor(this|
|00003910| 2c 20 73 65 6c 29 3b 0a | 09 09 7d 0a 09 72 65 74 |, sel);.|..}..ret|
|00003920| 75 72 6e 20 74 72 75 65 | 3b 0a 09 7d 0a 7d 0a 0a |urn true|;..}.}..|
|00003930| 2f 2f 20 50 72 69 6e 74 | 65 72 45 64 69 74 52 65 |// Print|erEditRe|
|00003940| 71 75 65 73 74 6f 72 0a | 2f 2f 20 41 20 70 6f 70 |questor.|// A pop|
|00003950| 2d 75 70 20 77 69 6e 64 | 6f 77 20 66 6f 72 20 65 |-up wind|ow for e|
|00003960| 6e 74 65 72 69 6e 67 20 | 64 65 74 61 69 6c 73 20 |ntering |details |
|00003970| 6f 66 20 61 20 6e 65 77 | 20 6f 72 20 65 78 69 73 |of a new| or exis|
|00003980| 74 69 6e 67 20 70 72 69 | 6e 74 65 72 0a 63 6c 61 |ting pri|nter.cla|
|00003990| 73 73 20 50 72 69 6e 74 | 65 72 45 64 69 74 52 65 |ss Print|erEditRe|
|000039a0| 71 75 65 73 74 6f 72 20 | 65 78 74 65 6e 64 73 20 |questor |extends |
|000039b0| 46 69 78 65 64 46 72 61 | 6d 65 0a 7b 0a 09 50 72 |FixedFra|me.{..Pr|
|000039c0| 69 6e 74 65 72 73 50 61 | 6e 65 6c 20 70 61 72 65 |intersPa|nel pare|
|000039d0| 6e 74 3b 0a 09 69 6e 74 | 20 73 65 6c 20 3d 20 2d |nt;..int| sel = -|
|000039e0| 31 3b 0a 09 54 65 78 74 | 46 69 65 6c 64 20 6e 61 |1;..Text|Field na|
|000039f0| 6d 65 2c 20 74 79 70 65 | 2c 20 64 65 73 63 2c 20 |me, type|, desc, |
|00003a00| 63 6f 6d 6d 3b 0a 09 42 | 75 74 74 6f 6e 20 6f 6b |comm;..B|utton ok|
|00003a10| 2c 20 63 61 6e 63 65 6c | 3b 0a 0a 09 2f 2f 20 43 |, cancel|;...// C|
|00003a20| 72 65 61 74 65 20 61 20 | 72 65 71 75 65 73 74 6f |reate a |requesto|
|00003a30| 72 20 66 6f 72 20 61 64 | 64 69 6e 67 20 61 20 6e |r for ad|ding a n|
|00003a40| 65 77 20 70 72 69 6e 74 | 65 72 0a 09 50 72 69 6e |ew print|er..Prin|
|00003a50| 74 65 72 45 64 69 74 52 | 65 71 75 65 73 74 6f 72 |terEditR|equestor|
|00003a60| 28 50 72 69 6e 74 65 72 | 73 50 61 6e 65 6c 20 70 |(Printer|sPanel p|
|00003a70| 29 0a 09 7b 0a 09 73 75 | 70 65 72 28 6e 65 77 20 |)..{..su|per(new |
|00003a80| 44 69 6d 65 6e 73 69 6f | 6e 28 33 30 30 2c 20 2d |Dimensio|n(300, -|
|00003a90| 31 29 29 3b 0a 09 70 61 | 72 65 6e 74 20 3d 20 70 |1));..pa|rent = p|
|00003aa0| 3b 0a 09 2f 2f 20 63 72 | 65 61 74 65 20 55 49 0a |;..// cr|eate UI.|
|00003ab0| 09 73 65 74 4c 61 79 6f | 75 74 28 6e 65 77 20 42 |.setLayo|ut(new B|
|00003ac0| 6f 72 64 65 72 4c 61 79 | 6f 75 74 28 29 29 3b 0a |orderLay|out());.|
|00003ad0| 09 50 61 6e 65 6c 20 74 | 6f 70 20 3d 20 6e 65 77 |.Panel t|op = new|
|00003ae0| 20 50 61 6e 65 6c 28 29 | 3b 0a 09 74 6f 70 2e 73 | Panel()|;..top.s|
|00003af0| 65 74 4c 61 79 6f 75 74 | 28 6e 65 77 20 42 6f 72 |etLayout|(new Bor|
|00003b00| 64 65 72 4c 61 79 6f 75 | 74 28 29 29 3b 0a 09 50 |derLayou|t());..P|
|00003b10| 61 6e 65 6c 20 6c 65 66 | 74 20 3d 20 6e 65 77 20 |anel lef|t = new |
|00003b20| 50 61 6e 65 6c 28 29 3b | 0a 09 6c 65 66 74 2e 73 |Panel();|..left.s|
|00003b30| 65 74 4c 61 79 6f 75 74 | 28 6e 65 77 20 47 72 69 |etLayout|(new Gri|
|00003b40| 64 4c 61 79 6f 75 74 28 | 34 2c 31 29 29 3b 0a 09 |dLayout(|4,1));..|
|00003b50| 6c 65 66 74 2e 61 64 64 | 28 6e 65 77 20 4c 61 62 |left.add|(new Lab|
|00003b60| 65 6c 28 22 4e 61 6d 65 | 22 29 29 3b 0a 09 6c 65 |el("Name|"));..le|
|00003b70| 66 74 2e 61 64 64 28 6e | 65 77 20 4c 61 62 65 6c |ft.add(n|ew Label|
|00003b80| 28 22 54 79 70 65 22 29 | 29 3b 0a 09 6c 65 66 74 |("Type")|);..left|
|00003b90| 2e 61 64 64 28 6e 65 77 | 20 4c 61 62 65 6c 28 22 |.add(new| Label("|
|00003ba0| 44 65 73 63 72 69 70 74 | 69 6f 6e 22 29 29 3b 0a |Descript|ion"));.|
|00003bb0| 09 6c 65 66 74 2e 61 64 | 64 28 6e 65 77 20 4c 61 |.left.ad|d(new La|
|00003bc0| 62 65 6c 28 22 43 6f 6d | 6d 61 6e 64 22 29 29 3b |bel("Com|mand"));|
|00003bd0| 0a 09 74 6f 70 2e 61 64 | 64 28 22 57 65 73 74 22 |..top.ad|d("West"|
|00003be0| 2c 6c 65 66 74 29 3b 0a | 09 50 61 6e 65 6c 20 72 |,left);.|.Panel r|
|00003bf0| 69 67 68 74 20 3d 20 6e | 65 77 20 50 61 6e 65 6c |ight = n|ew Panel|
|00003c00| 28 29 3b 0a 09 72 69 67 | 68 74 2e 73 65 74 4c 61 |();..rig|ht.setLa|
|00003c10| 79 6f 75 74 28 6e 65 77 | 20 47 72 69 64 4c 61 79 |yout(new| GridLay|
|00003c20| 6f 75 74 28 34 2c 31 29 | 29 3b 0a 09 72 69 67 68 |out(4,1)|);..righ|
|00003c30| 74 2e 61 64 64 28 6e 61 | 6d 65 20 3d 20 6e 65 77 |t.add(na|me = new|
|00003c40| 20 54 65 78 74 46 69 65 | 6c 64 28 29 29 3b 0a 09 | TextFie|ld());..|
|00003c50| 72 69 67 68 74 2e 61 64 | 64 28 74 79 70 65 20 3d |right.ad|d(type =|
|00003c60| 20 6e 65 77 20 54 65 78 | 74 46 69 65 6c 64 28 29 | new Tex|tField()|
|00003c70| 29 3b 0a 09 72 69 67 68 | 74 2e 61 64 64 28 64 65 |);..righ|t.add(de|
|00003c80| 73 63 20 3d 20 6e 65 77 | 20 54 65 78 74 46 69 65 |sc = new| TextFie|
|00003c90| 6c 64 28 29 29 3b 0a 09 | 72 69 67 68 74 2e 61 64 |ld());..|right.ad|
|00003ca0| 64 28 63 6f 6d 6d 20 3d | 20 6e 65 77 20 54 65 78 |d(comm =| new Tex|
|00003cb0| 74 46 69 65 6c 64 28 29 | 29 3b 0a 09 74 6f 70 2e |tField()|);..top.|
|00003cc0| 61 64 64 28 22 43 65 6e | 74 65 72 22 2c 72 69 67 |add("Cen|ter",rig|
|00003cd0| 68 74 29 3b 0a 09 61 64 | 64 28 22 4e 6f 72 74 68 |ht);..ad|d("North|
|00003ce0| 22 2c 74 6f 70 29 3b 0a | 09 50 61 6e 65 6c 20 62 |",top);.|.Panel b|
|00003cf0| 6f 74 20 3d 20 6e 65 77 | 20 50 61 6e 65 6c 28 29 |ot = new| Panel()|
|00003d00| 3b 0a 09 62 6f 74 2e 73 | 65 74 4c 61 79 6f 75 74 |;..bot.s|etLayout|
|00003d10| 28 6e 65 77 20 46 6c 6f | 77 4c 61 79 6f 75 74 28 |(new Flo|wLayout(|
|00003d20| 46 6c 6f 77 4c 61 79 6f | 75 74 2e 52 49 47 48 54 |FlowLayo|ut.RIGHT|
|00003d30| 29 29 3b 0a 09 62 6f 74 | 2e 61 64 64 28 6f 6b 20 |));..bot|.add(ok |
|00003d40| 3d 20 6e 65 77 20 42 75 | 74 74 6f 6e 28 22 4f 6b |= new Bu|tton("Ok|
|00003d50| 22 29 29 3b 0a 09 62 6f | 74 2e 61 64 64 28 63 61 |"));..bo|t.add(ca|
|00003d60| 6e 63 65 6c 20 3d 20 6e | 65 77 20 42 75 74 74 6f |ncel = n|ew Butto|
|00003d70| 6e 28 22 43 61 6e 63 65 | 6c 22 29 29 3b 0a 09 61 |n("Cance|l"));..a|
|00003d80| 64 64 28 22 53 6f 75 74 | 68 22 2c 62 6f 74 29 3b |dd("Sout|h",bot);|
|00003d90| 0a 09 73 65 74 54 69 74 | 6c 65 28 22 50 72 69 6e |..setTit|le("Prin|
|00003da0| 74 65 72 20 64 65 74 61 | 69 6c 73 22 29 3b 0a 09 |ter deta|ils");..|
|00003db0| 70 61 63 6b 28 29 3b 0a | 09 73 68 6f 77 28 29 3b |pack();.|.show();|
|00003dc0| 0a 09 7d 0a 0a 09 50 72 | 69 6e 74 65 72 45 64 69 |..}...Pr|interEdi|
|00003dd0| 74 52 65 71 75 65 73 74 | 6f 72 28 50 72 69 6e 74 |tRequest|or(Print|
|00003de0| 65 72 73 50 61 6e 65 6c | 20 70 2c 20 69 6e 74 20 |ersPanel| p, int |
|00003df0| 73 29 0a 09 7b 0a 09 74 | 68 69 73 28 70 29 3b 0a |s)..{..t|his(p);.|
|00003e00| 09 73 65 6c 20 3d 20 73 | 3b 0a 09 6e 61 6d 65 2e |.sel = s|;..name.|
|00003e10| 73 65 74 54 65 78 74 28 | 28 53 74 72 69 6e 67 29 |setText(|(String)|
|00003e20| 70 61 72 65 6e 74 2e 6e | 61 6d 65 2e 65 6c 65 6d |parent.n|ame.elem|
|00003e30| 65 6e 74 41 74 28 73 65 | 6c 29 29 3b 0a 09 6e 61 |entAt(se|l));..na|
|00003e40| 6d 65 2e 73 65 74 45 64 | 69 74 61 62 6c 65 28 66 |me.setEd|itable(f|
|00003e50| 61 6c 73 65 29 3b 0a 09 | 74 79 70 65 2e 73 65 74 |alse);..|type.set|
|00003e60| 54 65 78 74 28 28 53 74 | 72 69 6e 67 29 70 61 72 |Text((St|ring)par|
|00003e70| 65 6e 74 2e 74 79 70 65 | 2e 65 6c 65 6d 65 6e 74 |ent.type|.element|
|00003e80| 41 74 28 73 65 6c 29 29 | 3b 0a 09 64 65 73 63 2e |At(sel))|;..desc.|
|00003e90| 73 65 74 54 65 78 74 28 | 28 53 74 72 69 6e 67 29 |setText(|(String)|
|00003ea0| 70 61 72 65 6e 74 2e 64 | 65 73 63 2e 65 6c 65 6d |parent.d|esc.elem|
|00003eb0| 65 6e 74 41 74 28 73 65 | 6c 29 29 3b 0a 09 63 6f |entAt(se|l));..co|
|00003ec0| 6d 6d 2e 73 65 74 54 65 | 78 74 28 28 53 74 72 69 |mm.setTe|xt((Stri|
|00003ed0| 6e 67 29 70 61 72 65 6e | 74 2e 63 6f 6d 6d 2e 65 |ng)paren|t.comm.e|
|00003ee0| 6c 65 6d 65 6e 74 41 74 | 28 73 65 6c 29 29 3b 0a |lementAt|(sel));.|
|00003ef0| 09 7d 0a 0a 09 70 75 62 | 6c 69 63 20 62 6f 6f 6c |.}...pub|lic bool|
|00003f00| 65 61 6e 20 68 61 6e 64 | 6c 65 45 76 65 6e 74 28 |ean hand|leEvent(|
|00003f10| 45 76 65 6e 74 20 65 76 | 74 29 0a 09 7b 0a 09 69 |Event ev|t)..{..i|
|00003f20| 66 20 28 65 76 74 2e 69 | 64 20 3d 3d 20 45 76 65 |f (evt.i|d == Eve|
|00003f30| 6e 74 2e 57 49 4e 44 4f | 57 5f 44 45 53 54 52 4f |nt.WINDO|W_DESTRO|
|00003f40| 59 20 7c 7c 0a 09 20 20 | 20 20 65 76 74 2e 69 64 |Y ||.. | evt.id|
|00003f50| 20 3d 3d 20 45 76 65 6e | 74 2e 41 43 54 49 4f 4e | == Even|t.ACTION|
|00003f60| 5f 45 56 45 4e 54 20 26 | 26 20 65 76 74 2e 74 61 |_EVENT &|& evt.ta|
|00003f70| 72 67 65 74 20 3d 3d 20 | 63 61 6e 63 65 6c 29 0a |rget == |cancel).|
|00003f80| 09 09 64 69 73 70 6f 73 | 65 28 29 3b 0a 09 65 6c |..dispos|e();..el|
|00003f90| 73 65 20 69 66 20 28 65 | 76 74 2e 69 64 20 3d 3d |se if (e|vt.id ==|
|00003fa0| 20 45 76 65 6e 74 2e 41 | 43 54 49 4f 4e 5f 45 56 | Event.A|CTION_EV|
|00003fb0| 45 4e 54 20 26 26 20 65 | 76 74 2e 74 61 72 67 65 |ENT && e|vt.targe|
|00003fc0| 74 20 3d 3d 20 6f 6b 29 | 20 7b 0a 09 09 2f 2f 20 |t == ok)| {...// |
|00003fd0| 41 64 64 20 6f 72 20 75 | 70 64 61 74 65 20 74 68 |Add or u|pdate th|
|00003fe0| 69 73 20 70 72 69 6e 74 | 65 72 0a 0a 09 09 2f 2f |is print|er....//|
|00003ff0| 20 54 72 79 20 74 6f 20 | 66 69 6e 64 20 61 20 70 | Try to |find a p|
|00004000| 72 69 6e 74 65 72 20 77 | 69 74 68 20 74 68 69 73 |rinter w|ith this|
|00004010| 20 6e 61 6d 65 0a 09 09 | 69 6e 74 20 6f 6c 64 20 | name...|int old |
|00004020| 3d 20 2d 31 3b 0a 09 09 | 66 6f 72 28 69 6e 74 20 |= -1;...|for(int |
|00004030| 69 3d 30 3b 20 69 3c 70 | 61 72 65 6e 74 2e 6e 61 |i=0; i<p|arent.na|
|00004040| 6d 65 2e 73 69 7a 65 28 | 29 3b 20 69 2b 2b 29 20 |me.size(|); i++) |
|00004050| 7b 0a 09 09 09 53 74 72 | 69 6e 67 20 6f 6c 64 6e |{....Str|ing oldn|
|00004060| 61 6d 65 20 3d 20 28 53 | 74 72 69 6e 67 29 70 61 |ame = (S|tring)pa|
|00004070| 72 65 6e 74 2e 6e 61 6d | 65 2e 65 6c 65 6d 65 6e |rent.nam|e.elemen|
|00004080| 74 41 74 28 69 29 3b 0a | 09 09 09 69 66 20 28 6f |tAt(i);.|...if (o|
|00004090| 6c 64 6e 61 6d 65 2e 65 | 71 75 61 6c 73 28 6e 61 |ldname.e|quals(na|
|000040a0| 6d 65 2e 67 65 74 54 65 | 78 74 28 29 29 29 0a 09 |me.getTe|xt()))..|
|000040b0| 09 09 09 6f 6c 64 20 3d | 20 69 3b 0a 09 09 09 7d |...old =| i;....}|
|000040c0| 0a 0a 09 09 69 66 20 28 | 73 65 6c 20 3c 20 30 29 |....if (|sel < 0)|
|000040d0| 20 7b 0a 09 09 09 2f 2f | 20 49 73 20 74 68 69 73 | {....//| Is this|
|000040e0| 20 61 20 75 6e 69 71 75 | 65 20 6e 61 6d 65 3f 0a | a uniqu|e name?.|
|000040f0| 09 09 09 69 66 20 28 6f | 6c 64 20 21 3d 20 2d 31 |...if (o|ld != -1|
|00004100| 29 20 7b 0a 09 09 09 09 | 6e 65 77 20 45 72 72 6f |) {.....|new Erro|
|00004110| 72 57 69 6e 64 6f 77 28 | 22 41 20 70 72 69 6e 74 |rWindow(|"A print|
|00004120| 65 72 20 77 69 74 68 20 | 74 68 65 20 6e 61 6d 65 |er with |the name|
|00004130| 20 22 2b 0a 09 09 09 09 | 09 09 6e 61 6d 65 2e 67 | "+.....|..name.g|
|00004140| 65 74 54 65 78 74 28 29 | 2b 22 20 65 78 69 73 74 |etText()|+" exist|
|00004150| 73 22 29 3b 0a 09 09 09 | 09 72 65 74 75 72 6e 20 |s");....|.return |
|00004160| 74 72 75 65 3b 0a 09 09 | 09 09 7d 0a 09 09 09 7d |true;...|..}....}|
|00004170| 0a 09 09 65 6c 73 65 20 | 7b 0a 09 09 09 2f 2f 20 |...else |{....// |
|00004180| 52 65 6d 6f 76 65 20 6f | 6c 64 20 70 72 69 6e 74 |Remove o|ld print|
|00004190| 65 72 0a 09 09 09 70 61 | 72 65 6e 74 2e 6e 61 6d |er....pa|rent.nam|
|000041a0| 65 2e 72 65 6d 6f 76 65 | 45 6c 65 6d 65 6e 74 41 |e.remove|ElementA|
|000041b0| 74 28 6f 6c 64 29 3b 0a | 09 09 09 70 61 72 65 6e |t(old);.|...paren|
|000041c0| 74 2e 74 79 70 65 2e 72 | 65 6d 6f 76 65 45 6c 65 |t.type.r|emoveEle|
|000041d0| 6d 65 6e 74 41 74 28 6f | 6c 64 29 3b 0a 09 09 09 |mentAt(o|ld);....|
|000041e0| 70 61 72 65 6e 74 2e 64 | 65 73 63 2e 72 65 6d 6f |parent.d|esc.remo|
|000041f0| 76 65 45 6c 65 6d 65 6e | 74 41 74 28 6f 6c 64 29 |veElemen|tAt(old)|
|00004200| 3b 0a 09 09 09 70 61 72 | 65 6e 74 2e 63 6f 6d 6d |;....par|ent.comm|
|00004210| 2e 72 65 6d 6f 76 65 45 | 6c 65 6d 65 6e 74 41 74 |.removeE|lementAt|
|00004220| 28 6f 6c 64 29 3b 0a 09 | 09 09 7d 0a 09 09 70 61 |(old);..|..}...pa|
|00004230| 72 65 6e 74 2e 6e 61 6d | 65 2e 61 64 64 45 6c 65 |rent.nam|e.addEle|
|00004240| 6d 65 6e 74 28 6e 61 6d | 65 2e 67 65 74 54 65 78 |ment(nam|e.getTex|
|00004250| 74 28 29 29 3b 0a 09 09 | 70 61 72 65 6e 74 2e 74 |t());...|parent.t|
|00004260| 79 70 65 2e 61 64 64 45 | 6c 65 6d 65 6e 74 28 74 |ype.addE|lement(t|
|00004270| 79 70 65 2e 67 65 74 54 | 65 78 74 28 29 29 3b 0a |ype.getT|ext());.|
|00004280| 09 09 70 61 72 65 6e 74 | 2e 64 65 73 63 2e 61 64 |..parent|.desc.ad|
|00004290| 64 45 6c 65 6d 65 6e 74 | 28 64 65 73 63 2e 67 65 |dElement|(desc.ge|
|000042a0| 74 54 65 78 74 28 29 29 | 3b 0a 09 09 70 61 72 65 |tText())|;...pare|
|000042b0| 6e 74 2e 63 6f 6d 6d 2e | 61 64 64 45 6c 65 6d 65 |nt.comm.|addEleme|
|000042c0| 6e 74 28 63 6f 6d 6d 2e | 67 65 74 54 65 78 74 28 |nt(comm.|getText(|
|000042d0| 29 29 3b 0a 09 09 70 61 | 72 65 6e 74 2e 66 69 6c |));...pa|rent.fil|
|000042e0| 6c 28 29 3b 0a 09 09 70 | 61 72 65 6e 74 2e 77 72 |l();...p|arent.wr|
|000042f0| 69 74 65 28 29 3b 0a 09 | 09 64 69 73 70 6f 73 65 |ite();..|.dispose|
|00004300| 28 29 3b 0a 09 09 7d 0a | 09 72 65 74 75 72 6e 20 |();...}.|.return |
|00004310| 73 75 70 65 72 2e 68 61 | 6e 64 6c 65 45 76 65 6e |super.ha|ndleEven|
|00004320| 74 28 65 76 74 29 3b 0a | 09 7d 0a 7d 0a 0a 0a 2f |t(evt);.|.}.}.../|
|00004330| 2f 20 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 50 61 6e |/ Connec|tionsPan|
|00004340| 65 6c 0a 2f 2f 20 44 69 | 73 70 6c 61 79 73 20 74 |el.// Di|splays t|
|00004350| 68 65 20 6c 69 73 74 20 | 6f 66 20 63 75 72 72 65 |he list |of curre|
|00004360| 6e 74 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 73 20 74 |nt conne|ctions t|
|00004370| 6f 20 74 68 65 20 73 65 | 72 76 65 72 0a 63 6c 61 |o the se|rver.cla|
|00004380| 73 73 20 43 6f 6e 6e 65 | 63 74 69 6f 6e 73 50 61 |ss Conne|ctionsPa|
|00004390| 6e 65 6c 20 65 78 74 65 | 6e 64 73 20 50 61 6e 65 |nel exte|nds Pane|
|000043a0| 6c 0a 7b 0a 09 4a 46 53 | 63 6c 69 65 6e 74 20 63 |l.{..JFS|client c|
|000043b0| 6c 69 65 6e 74 3b 0a 09 | 44 6f 75 62 6c 65 4c 69 |lient;..|DoubleLi|
|000043c0| 73 74 50 61 6e 65 6c 20 | 63 6c 69 73 74 3b 0a 09 |stPanel |clist;..|
|000043d0| 42 75 74 74 6f 6e 20 63 | 72 65 66 2c 20 63 69 6e |Button c|ref, cin|
|000043e0| 66 6f 2c 20 63 6b 69 6c | 6c 3b 0a 0a 09 56 65 63 |fo, ckil|l;...Vec|
|000043f0| 74 6f 72 20 69 64 2c 20 | 68 6f 73 74 2c 20 6e 61 |tor id, |host, na|
|00004400| 6d 65 2c 20 6c 61 73 74 | 2c 20 73 65 6e 74 2c 20 |me, last|, sent, |
|00004410| 72 65 63 76 3b 0a 0a 09 | 43 6f 6e 6e 65 63 74 69 |recv;...|Connecti|
|00004420| 6f 6e 73 50 61 6e 65 6c | 28 29 0a 09 7b 0a 09 2f |onsPanel|()..{../|
|00004430| 2f 20 43 72 65 61 74 65 | 20 75 73 65 72 20 69 6e |/ Create| user in|
|00004440| 74 65 72 66 61 63 65 0a | 09 73 65 74 4c 61 79 6f |terface.|.setLayo|
|00004450| 75 74 28 6e 65 77 20 42 | 6f 72 64 65 72 4c 61 79 |ut(new B|orderLay|
|00004460| 6f 75 74 28 29 29 3b 0a | 09 61 64 64 28 22 43 65 |out());.|.add("Ce|
|00004470| 6e 74 65 72 22 2c 63 6c | 69 73 74 20 3d 20 6e 65 |nter",cl|ist = ne|
|00004480| 77 20 44 6f 75 62 6c 65 | 4c 69 73 74 50 61 6e 65 |w Double|ListPane|
|00004490| 6c 28 22 48 6f 73 74 22 | 2c 22 55 73 65 72 22 29 |l("Host"|,"User")|
|000044a0| 29 3b 0a 09 50 61 6e 65 | 6c 20 74 6f 70 20 3d 20 |);..Pane|l top = |
|000044b0| 6e 65 77 20 50 61 6e 65 | 6c 28 29 3b 0a 09 74 6f |new Pane|l();..to|
|000044c0| 70 2e 73 65 74 4c 61 79 | 6f 75 74 28 6e 65 77 20 |p.setLay|out(new |
|000044d0| 46 6c 6f 77 4c 61 79 6f | 75 74 28 46 6c 6f 77 4c |FlowLayo|ut(FlowL|
|000044e0| 61 79 6f 75 74 2e 4c 45 | 46 54 29 29 3b 0a 09 74 |ayout.LE|FT));..t|
|000044f0| 6f 70 2e 61 64 64 28 63 | 72 65 66 20 3d 20 6e 65 |op.add(c|ref = ne|
|00004500| 77 20 42 75 74 74 6f 6e | 28 22 52 65 66 72 65 73 |w Button|("Refres|
|00004510| 68 22 29 29 3b 0a 09 74 | 6f 70 2e 61 64 64 28 63 |h"));..t|op.add(c|
|00004520| 69 6e 66 6f 20 3d 20 6e | 65 77 20 42 75 74 74 6f |info = n|ew Butto|
|00004530| 6e 28 22 49 6e 66 6f 22 | 29 29 3b 0a 09 74 6f 70 |n("Info"|));..top|
|00004540| 2e 61 64 64 28 63 6b 69 | 6c 6c 20 3d 20 6e 65 77 |.add(cki|ll = new|
|00004550| 20 42 75 74 74 6f 6e 28 | 22 4b 69 6c 6c 22 29 29 | Button(|"Kill"))|
|00004560| 3b 0a 09 61 64 64 28 22 | 4e 6f 72 74 68 22 2c 74 |;..add("|North",t|
|00004570| 6f 70 29 3b 0a 0a 09 7d | 0a 0a 09 2f 2f 20 63 6f |op);...}|...// co|
|00004580| 6e 6e 65 63 74 0a 09 2f | 2f 20 52 65 61 64 20 61 |nnect../|/ Read a|
|00004590| 6e 64 20 64 69 73 70 6c | 61 79 20 63 6f 6e 6e 65 |nd displ|ay conne|
|000045a0| 63 74 69 6f 6e 73 0a 09 | 76 6f 69 64 20 63 6f 6e |ctions..|void con|
|000045b0| 6e 65 63 74 28 4a 46 53 | 63 6c 69 65 6e 74 20 63 |nect(JFS|client c|
|000045c0| 29 0a 09 7b 0a 09 63 6c | 69 65 6e 74 20 3d 20 63 |)..{..cl|ient = c|
|000045d0| 3b 0a 09 63 72 65 61 64 | 28 29 3b 0a 09 63 66 69 |;..cread|();..cfi|
|000045e0| 6c 6c 28 29 3b 0a 09 7d | 0a 0a 09 2f 2f 20 63 72 |ll();..}|...// cr|
|000045f0| 65 61 64 0a 09 2f 2f 20 | 47 65 74 20 74 68 65 20 |ead..// |Get the |
|00004600| 6c 69 73 74 20 6f 66 20 | 61 63 74 69 76 65 20 63 |list of |active c|
|00004610| 6f 6e 6e 65 63 74 69 6f | 6e 73 20 66 72 6f 6d 20 |onnectio|ns from |
|00004620| 74 68 65 20 73 65 72 76 | 65 72 0a 09 76 6f 69 64 |the serv|er..void|
|00004630| 20 63 72 65 61 64 28 29 | 0a 09 7b 0a 09 42 75 66 | cread()|..{..Buf|
|00004640| 66 65 72 49 6e 70 75 74 | 53 74 72 65 61 6d 20 62 |ferInput|Stream b|
|00004650| 75 66 20 3d 20 6e 75 6c | 6c 3b 0a 09 4d 65 73 73 |uf = nul|l;..Mess|
|00004660| 61 67 65 20 68 65 61 64 | 20 3d 20 6e 65 77 20 4d |age head| = new M|
|00004670| 65 73 73 61 67 65 28 29 | 3b 0a 09 68 65 61 64 2e |essage()|;..head.|
|00004680| 61 64 64 28 22 43 6f 6d | 6d 61 6e 64 22 2c 22 4e |add("Com|mand","N|
|00004690| 65 74 73 74 61 74 22 29 | 3b 0a 09 74 72 79 20 62 |etstat")|;..try b|
|000046a0| 75 66 20 3d 20 6e 65 77 | 20 42 75 66 66 65 72 49 |uf = new| BufferI|
|000046b0| 6e 70 75 74 53 74 72 65 | 61 6d 28 0a 09 09 09 63 |nputStre|am(....c|
|000046c0| 6c 69 65 6e 74 2e 64 65 | 76 67 65 74 28 22 2f 64 |lient.de|vget("/d|
|000046d0| 65 76 2f 53 65 72 76 65 | 72 22 2c 20 68 65 61 64 |ev/Serve|r", head|
|000046e0| 29 2e 67 65 74 64 61 74 | 61 28 29 29 3b 0a 09 63 |).getdat|a());..c|
|000046f0| 61 74 63 68 28 52 65 71 | 75 65 73 74 45 78 63 65 |atch(Req|uestExce|
|00004700| 70 74 69 6f 6e 20 65 29 | 20 7b 0a 09 09 6e 65 77 |ption e)| {...new|
|00004710| 20 45 72 72 6f 72 57 69 | 6e 64 6f 77 28 22 43 6f | ErrorWi|ndow("Co|
|00004720| 75 6c 64 20 6e 6f 74 20 | 72 65 61 64 20 2f 64 65 |uld not |read /de|
|00004730| 76 2f 53 65 72 76 65 72 | 20 3a 20 22 2b 0a 09 09 |v/Server| : "+...|
|00004740| 09 09 65 2e 67 65 74 4d | 65 73 73 61 67 65 28 29 |..e.getM|essage()|
|00004750| 29 3b 0a 09 09 72 65 74 | 75 72 6e 3b 0a 09 09 7d |);...ret|urn;...}|
|00004760| 0a 09 69 64 20 3d 20 6e | 65 77 20 56 65 63 74 6f |..id = n|ew Vecto|
|00004770| 72 28 29 3b 20 68 6f 73 | 74 20 3d 20 6e 65 77 20 |r(); hos|t = new |
|00004780| 56 65 63 74 6f 72 28 29 | 3b 20 6e 61 6d 65 20 3d |Vector()|; name =|
|00004790| 20 6e 65 77 20 56 65 63 | 74 6f 72 28 29 3b 0a 09 | new Vec|tor();..|
|000047a0| 6c 61 73 74 20 3d 20 6e | 65 77 20 56 65 63 74 6f |last = n|ew Vecto|
|000047b0| 72 28 29 3b 20 73 65 6e | 74 20 3d 20 6e 65 77 20 |r(); sen|t = new |
|000047c0| 56 65 63 74 6f 72 28 29 | 3b 20 72 65 63 76 20 3d |Vector()|; recv =|
|000047d0| 20 6e 65 77 20 56 65 63 | 74 6f 72 28 29 3b 0a 09 | new Vec|tor();..|
|000047e0| 74 72 79 20 7b 0a 09 09 | 77 68 69 6c 65 28 74 72 |try {...|while(tr|
|000047f0| 75 65 29 20 7b 0a 09 09 | 09 53 74 72 69 6e 67 20 |ue) {...|.String |
|00004800| 6c 69 6e 65 20 3d 20 62 | 75 66 2e 67 65 74 73 28 |line = b|uf.gets(|
|00004810| 29 3b 0a 09 09 09 53 74 | 72 69 6e 67 53 70 6c 69 |);....St|ringSpli|
|00004820| 74 74 65 72 20 74 6f 6b | 20 3d 20 6e 65 77 20 53 |tter tok| = new S|
|00004830| 74 72 69 6e 67 53 70 6c | 69 74 74 65 72 28 6c 69 |tringSpl|itter(li|
|00004840| 6e 65 2c 20 27 3a 27 29 | 3b 0a 09 09 09 69 64 2e |ne, ':')|;....id.|
|00004850| 61 64 64 45 6c 65 6d 65 | 6e 74 28 6e 65 77 20 49 |addEleme|nt(new I|
|00004860| 6e 74 65 67 65 72 28 74 | 6f 6b 2e 6e 65 78 74 54 |nteger(t|ok.nextT|
|00004870| 6f 6b 65 6e 28 29 29 29 | 3b 0a 09 09 09 68 6f 73 |oken()))|;....hos|
|00004880| 74 2e 61 64 64 45 6c 65 | 6d 65 6e 74 28 74 6f 6b |t.addEle|ment(tok|
|00004890| 2e 6e 65 78 74 54 6f 6b | 65 6e 28 29 29 3b 0a 09 |.nextTok|en());..|
|000048a0| 09 09 6e 61 6d 65 2e 61 | 64 64 45 6c 65 6d 65 6e |..name.a|ddElemen|
|000048b0| 74 28 74 6f 6b 2e 6e 65 | 78 74 54 6f 6b 65 6e 28 |t(tok.ne|xtToken(|
|000048c0| 29 29 3b 0a 09 09 09 6c | 61 73 74 2e 61 64 64 45 |));....l|ast.addE|
|000048d0| 6c 65 6d 65 6e 74 28 6e | 65 77 20 4c 6f 6e 67 28 |lement(n|ew Long(|
|000048e0| 74 6f 6b 2e 6e 65 78 74 | 54 6f 6b 65 6e 28 29 29 |tok.next|Token())|
|000048f0| 29 3b 0a 09 09 09 73 65 | 6e 74 2e 61 64 64 45 6c |);....se|nt.addEl|
|00004900| 65 6d 65 6e 74 28 6e 65 | 77 20 49 6e 74 65 67 65 |ement(ne|w Intege|
|00004910| 72 28 74 6f 6b 2e 6e 65 | 78 74 54 6f 6b 65 6e 28 |r(tok.ne|xtToken(|
|00004920| 29 29 29 3b 0a 09 09 09 | 72 65 63 76 2e 61 64 64 |)));....|recv.add|
|00004930| 45 6c 65 6d 65 6e 74 28 | 6e 65 77 20 49 6e 74 65 |Element(|new Inte|
|00004940| 67 65 72 28 74 6f 6b 2e | 6e 65 78 74 54 6f 6b 65 |ger(tok.|nextToke|
|00004950| 6e 28 29 29 29 3b 0a 09 | 09 09 7d 0a 09 09 7d 0a |n()));..|..}...}.|
|00004960| 09 63 61 74 63 68 28 49 | 4f 45 78 63 65 70 74 69 |.catch(I|OExcepti|
|00004970| 6f 6e 20 65 29 3b 0a 09 | 7d 0a 0a 09 2f 2f 20 63 |on e);..|}...// c|
|00004980| 66 69 6c 6c 0a 09 2f 2f | 20 46 69 6c 6c 20 74 68 |fill..//| Fill th|
|00004990| 65 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 73 20 6c 69 |e connec|tions li|
|000049a0| 73 74 20 77 69 74 68 20 | 63 75 72 72 65 6e 74 20 |st with |current |
|000049b0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 73 0a 09 76 6f 69 |connecti|ons..voi|
|000049c0| 64 20 63 66 69 6c 6c 28 | 29 0a 09 7b 0a 09 63 6c |d cfill(|)..{..cl|
|000049d0| 69 73 74 2e 63 6c 65 61 | 72 28 29 3b 0a 09 66 6f |ist.clea|r();..fo|
|000049e0| 72 28 69 6e 74 20 69 3d | 30 3b 20 69 3c 69 64 2e |r(int i=|0; i<id.|
|000049f0| 73 69 7a 65 28 29 3b 20 | 69 2b 2b 29 0a 09 09 63 |size(); |i++)...c|
|00004a00| 6c 69 73 74 2e 61 64 64 | 49 74 65 6d 28 28 53 74 |list.add|Item((St|
|00004a10| 72 69 6e 67 29 68 6f 73 | 74 2e 65 6c 65 6d 65 6e |ring)hos|t.elemen|
|00004a20| 74 41 74 28 69 29 2c 0a | 09 09 09 20 20 20 20 20 |tAt(i),.|... |
|00004a30| 20 28 53 74 72 69 6e 67 | 29 6e 61 6d 65 2e 65 6c | (String|)name.el|
|00004a40| 65 6d 65 6e 74 41 74 28 | 69 29 29 3b 0a 09 7d 0a |ementAt(|i));..}.|
|00004a50| 0a 09 70 75 62 6c 69 63 | 20 62 6f 6f 6c 65 61 6e |..public| boolean|
|00004a60| 20 61 63 74 69 6f 6e 28 | 45 76 65 6e 74 20 65 76 | action(|Event ev|
|00004a70| 74 2c 20 4f 62 6a 65 63 | 74 20 6f 62 6a 29 0a 09 |t, Objec|t obj)..|
|00004a80| 7b 0a 09 69 6e 74 20 73 | 65 6c 20 3d 20 63 6c 69 |{..int s|el = cli|
|00004a90| 73 74 2e 73 65 6c 65 63 | 74 65 64 28 29 3b 0a 09 |st.selec|ted();..|
|00004aa0| 69 66 20 28 65 76 74 2e | 74 61 72 67 65 74 20 3d |if (evt.|target =|
|00004ab0| 3d 20 63 72 65 66 29 20 | 7b 0a 09 09 2f 2f 20 72 |= cref) |{...// r|
|00004ac0| 65 66 72 65 73 68 20 62 | 75 74 74 6f 6e 20 63 6c |efresh b|utton cl|
|00004ad0| 69 63 6b 65 64 0a 09 09 | 63 72 65 61 64 28 29 3b |icked...|cread();|
|00004ae0| 0a 09 09 63 66 69 6c 6c | 28 29 3b 0a 09 09 7d 0a |...cfill|();...}.|
|00004af0| 09 65 6c 73 65 20 69 66 | 20 28 65 76 74 2e 74 61 |.else if| (evt.ta|
|00004b00| 72 67 65 74 20 3d 3d 20 | 63 69 6e 66 6f 20 7c 7c |rget == |cinfo |||
|00004b10| 20 0a 09 09 20 65 76 74 | 2e 74 61 72 67 65 74 20 | ... evt|.target |
|00004b20| 3d 3d 20 63 6c 69 73 74 | 20 26 26 20 28 28 53 74 |== clist| && ((St|
|00004b30| 72 69 6e 67 29 65 76 74 | 2e 61 72 67 29 2e 65 71 |ring)evt|.arg).eq|
|00004b40| 75 61 6c 73 28 22 44 6f | 75 62 6c 65 22 29 29 20 |uals("Do|uble")) |
|00004b50| 7b 0a 09 09 2f 2f 20 49 | 6e 66 6f 20 62 75 74 74 |{...// I|nfo butt|
|00004b60| 6f 6e 20 63 6c 69 63 6b | 65 64 0a 09 09 69 66 20 |on click|ed...if |
|00004b70| 28 73 65 6c 20 3c 20 30 | 29 20 72 65 74 75 72 6e |(sel < 0|) return|
|00004b80| 20 74 72 75 65 3b 0a 09 | 09 6e 65 77 20 43 6f 6e | true;..|.new Con|
|00004b90| 6e 65 63 74 69 6f 6e 49 | 6e 66 6f 52 65 71 75 65 |nectionI|nfoReque|
|00004ba0| 73 74 6f 72 28 0a 09 09 | 09 28 28 49 6e 74 65 67 |stor(...|.((Integ|
|00004bb0| 65 72 29 69 64 2e 65 6c | 65 6d 65 6e 74 41 74 28 |er)id.el|ementAt(|
|00004bc0| 73 65 6c 29 29 2e 69 6e | 74 56 61 6c 75 65 28 29 |sel)).in|tValue()|
|00004bd0| 2c 0a 09 09 09 28 53 74 | 72 69 6e 67 29 68 6f 73 |,....(St|ring)hos|
|00004be0| 74 2e 65 6c 65 6d 65 6e | 74 41 74 28 73 65 6c 29 |t.elemen|tAt(sel)|
|00004bf0| 2c 0a 09 09 09 28 53 74 | 72 69 6e 67 29 6e 61 6d |,....(St|ring)nam|
|00004c00| 65 2e 65 6c 65 6d 65 6e | 74 41 74 28 73 65 6c 29 |e.elemen|tAt(sel)|
|00004c10| 2c 0a 09 09 09 28 28 4c | 6f 6e 67 29 6c 61 73 74 |,....((L|ong)last|
|00004c20| 2e 65 6c 65 6d 65 6e 74 | 41 74 28 73 65 6c 29 29 |.element|At(sel))|
|00004c30| 2e 6c 6f 6e 67 56 61 6c | 75 65 28 29 2c 0a 09 09 |.longVal|ue(),...|
|00004c40| 09 28 28 49 6e 74 65 67 | 65 72 29 73 65 6e 74 2e |.((Integ|er)sent.|
|00004c50| 65 6c 65 6d 65 6e 74 41 | 74 28 73 65 6c 29 29 2e |elementA|t(sel)).|
|00004c60| 69 6e 74 56 61 6c 75 65 | 28 29 2c 0a 09 09 09 28 |intValue|(),....(|
|00004c70| 28 49 6e 74 65 67 65 72 | 29 72 65 63 76 2e 65 6c |(Integer|)recv.el|
|00004c80| 65 6d 65 6e 74 41 74 28 | 73 65 6c 29 29 2e 69 6e |ementAt(|sel)).in|
|00004c90| 74 56 61 6c 75 65 28 29 | 20 29 3b 0a 09 09 7d 0a |tValue()| );...}.|
|00004ca0| 09 65 6c 73 65 20 69 66 | 20 28 65 76 74 2e 74 61 |.else if| (evt.ta|
|00004cb0| 72 67 65 74 20 3d 3d 20 | 63 6b 69 6c 6c 29 20 7b |rget == |ckill) {|
|00004cc0| 0a 09 09 2f 2f 20 4b 69 | 6c 6c 20 63 6f 6e 6e 65 |...// Ki|ll conne|
|00004cd0| 63 74 69 6f 6e 20 62 75 | 74 74 6f 6e 20 63 6c 69 |ction bu|tton cli|
|00004ce0| 63 6b 65 64 0a 09 09 69 | 66 20 28 73 65 6c 20 3c |cked...i|f (sel <|
|00004cf0| 20 30 29 20 72 65 74 75 | 72 6e 20 74 72 75 65 3b | 0) retu|rn true;|
|00004d00| 0a 09 09 69 6e 74 20 63 | 69 64 20 3d 20 28 28 49 |...int c|id = ((I|
|00004d10| 6e 74 65 67 65 72 29 69 | 64 2e 65 6c 65 6d 65 6e |nteger)i|d.elemen|
|00004d20| 74 41 74 28 73 65 6c 29 | 29 2e 69 6e 74 56 61 6c |tAt(sel)|).intVal|
|00004d30| 75 65 28 29 3b 0a 09 09 | 4d 65 73 73 61 67 65 20 |ue();...|Message |
|00004d40| 68 65 61 64 20 3d 20 6e | 65 77 20 4d 65 73 73 61 |head = n|ew Messa|
|00004d50| 67 65 28 29 3b 0a 09 09 | 68 65 61 64 2e 61 64 64 |ge();...|head.add|
|00004d60| 28 22 43 6f 6d 6d 61 6e | 64 22 2c 22 4b 69 6c 6c |("Comman|d","Kill|
|00004d70| 22 29 3b 0a 09 09 68 65 | 61 64 2e 61 64 64 28 22 |");...he|ad.add("|
|00004d80| 49 64 22 2c 53 74 72 69 | 6e 67 2e 76 61 6c 75 65 |Id",Stri|ng.value|
|00004d90| 4f 66 28 63 69 64 29 29 | 3b 0a 09 09 74 72 79 20 |Of(cid))|;...try |
|00004da0| 63 6c 69 65 6e 74 2e 64 | 65 76 70 75 74 28 22 2f |client.d|evput("/|
|00004db0| 64 65 76 2f 53 65 72 76 | 65 72 22 2c 20 6e 75 6c |dev/Serv|er", nul|
|00004dc0| 6c 2c 20 68 65 61 64 29 | 3b 0a 09 09 63 61 74 63 |l, head)|;...catc|
|00004dd0| 68 28 52 65 71 75 65 73 | 74 45 78 63 65 70 74 69 |h(Reques|tExcepti|
|00004de0| 6f 6e 20 65 29 0a 09 09 | 09 6e 65 77 20 45 72 72 |on e)...|.new Err|
|00004df0| 6f 72 57 69 6e 64 6f 77 | 28 22 46 61 69 6c 65 64 |orWindow|("Failed|
|00004e00| 20 74 6f 20 6b 69 6c 6c | 20 63 6f 6e 6e 65 63 74 | to kill| connect|
|00004e10| 69 6f 6e 20 3a 20 22 2b | 0a 09 09 09 09 09 65 2e |ion : "+|......e.|
|00004e20| 67 65 74 4d 65 73 73 61 | 67 65 28 29 29 3b 0a 09 |getMessa|ge());..|
|00004e30| 09 63 72 65 61 64 28 29 | 3b 0a 09 09 63 66 69 6c |.cread()|;...cfil|
|00004e40| 6c 28 29 3b 0a 09 09 7d | 0a 09 72 65 74 75 72 6e |l();...}|..return|
|00004e50| 20 74 72 75 65 3b 0a 09 | 7d 0a 7d 0a 0a 2f 2f 20 | true;..|}.}..// |
|00004e60| 43 6f 6e 6e 65 63 74 69 | 6f 6e 49 6e 66 6f 52 65 |Connecti|onInfoRe|
|00004e70| 71 75 65 73 74 6f 72 0a | 2f 2f 20 41 20 77 69 6e |questor.|// A win|
|00004e80| 64 6f 77 20 66 6f 72 20 | 64 69 73 70 6c 61 79 69 |dow for |displayi|
|00004e90| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |ng infor|mation a|
|00004ea0| 62 6f 75 74 20 6f 6e 65 | 20 63 6f 6e 6e 65 63 74 |bout one| connect|
|00004eb0| 69 6f 6e 20 74 6f 20 74 | 68 65 20 73 65 72 76 65 |ion to t|he serve|
|00004ec0| 72 0a 63 6c 61 73 73 20 | 43 6f 6e 6e 65 63 74 69 |r.class |Connecti|
|00004ed0| 6f 6e 49 6e 66 6f 52 65 | 71 75 65 73 74 6f 72 20 |onInfoRe|questor |
|00004ee0| 65 78 74 65 6e 64 73 20 | 46 69 78 65 64 46 72 61 |extends |FixedFra|
|00004ef0| 6d 65 0a 7b 0a 09 42 75 | 74 74 6f 6e 20 63 6c 6f |me.{..Bu|tton clo|
|00004f00| 73 65 3b 0a 0a 09 43 6f | 6e 6e 65 63 74 69 6f 6e |se;...Co|nnection|
|00004f10| 49 6e 66 6f 52 65 71 75 | 65 73 74 6f 72 28 69 6e |InfoRequ|estor(in|
|00004f20| 74 20 69 64 2c 20 53 74 | 72 69 6e 67 20 68 6f 73 |t id, St|ring hos|
|00004f30| 74 2c 20 53 74 72 69 6e | 67 20 6e 61 6d 65 2c 0a |t, Strin|g name,.|
|00004f40| 09 09 09 09 6c 6f 6e 67 | 20 6c 61 73 74 2c 20 69 |....long| last, i|
|00004f50| 6e 74 20 73 65 6e 74 2c | 20 69 6e 74 20 72 65 63 |nt sent,| int rec|
|00004f60| 76 29 0a 09 7b 0a 09 73 | 75 70 65 72 28 6e 65 77 |v)..{..s|uper(new|
|00004f70| 20 44 69 6d 65 6e 73 69 | 6f 6e 28 33 30 30 2c 20 | Dimensi|on(300, |
|00004f80| 2d 31 29 29 3b 0a 09 73 | 65 74 4c 61 79 6f 75 74 |-1));..s|etLayout|
|00004f90| 28 6e 65 77 20 42 6f 72 | 64 65 72 4c 61 79 6f 75 |(new Bor|derLayou|
|00004fa0| 74 28 29 29 3b 0a 09 50 | 61 6e 65 6c 20 74 6f 70 |t());..P|anel top|
|00004fb0| 20 3d 20 6e 65 77 20 50 | 61 6e 65 6c 28 29 3b 0a | = new P|anel();.|
|00004fc0| 09 74 6f 70 2e 73 65 74 | 4c 61 79 6f 75 74 28 6e |.top.set|Layout(n|
|00004fd0| 65 77 20 42 6f 72 64 65 | 72 4c 61 79 6f 75 74 28 |ew Borde|rLayout(|
|00004fe0| 29 29 3b 0a 09 50 61 6e | 65 6c 20 6c 65 66 74 20 |));..Pan|el left |
|00004ff0| 3d 20 6e 65 77 20 50 61 | 6e 65 6c 28 29 3b 0a 09 |= new Pa|nel();..|
|00005000| 6c 65 66 74 2e 73 65 74 | 4c 61 79 6f 75 74 28 6e |left.set|Layout(n|
|00005010| 65 77 20 47 72 69 64 4c | 61 79 6f 75 74 28 36 2c |ew GridL|ayout(6,|
|00005020| 31 29 29 3b 0a 09 6c 65 | 66 74 2e 61 64 64 28 6e |1));..le|ft.add(n|
|00005030| 65 77 20 4c 61 62 65 6c | 28 22 43 6f 6e 6e 65 63 |ew Label|("Connec|
|00005040| 74 69 6f 6e 20 49 44 22 | 29 29 3b 0a 09 6c 65 66 |tion ID"|));..lef|
|00005050| 74 2e 61 64 64 28 6e 65 | 77 20 4c 61 62 65 6c 28 |t.add(ne|w Label(|
|00005060| 22 48 6f 73 74 6e 61 6d | 65 22 29 29 3b 0a 09 6c |"Hostnam|e"));..l|
|00005070| 65 66 74 2e 61 64 64 28 | 6e 65 77 20 4c 61 62 65 |eft.add(|new Labe|
|00005080| 6c 28 22 55 73 65 72 6e | 61 6d 65 22 29 29 3b 0a |l("Usern|ame"));.|
|00005090| 09 6c 65 66 74 2e 61 64 | 64 28 6e 65 77 20 4c 61 |.left.ad|d(new La|
|000050a0| 62 65 6c 28 22 4c 61 73 | 74 20 61 63 74 69 76 69 |bel("Las|t activi|
|000050b0| 74 79 22 29 29 3b 0a 09 | 6c 65 66 74 2e 61 64 64 |ty"));..|left.add|
|000050c0| 28 6e 65 77 20 4c 61 62 | 65 6c 28 22 42 79 74 65 |(new Lab|el("Byte|
|000050d0| 73 20 73 65 6e 74 22 29 | 29 3b 0a 09 6c 65 66 74 |s sent")|);..left|
|000050e0| 2e 61 64 64 28 6e 65 77 | 20 4c 61 62 65 6c 28 22 |.add(new| Label("|
|000050f0| 42 79 74 65 73 20 72 65 | 63 65 69 76 65 64 22 29 |Bytes re|ceived")|
|00005100| 29 3b 0a 09 74 6f 70 2e | 61 64 64 28 22 57 65 73 |);..top.|add("Wes|
|00005110| 74 22 2c 6c 65 66 74 29 | 3b 0a 09 50 61 6e 65 6c |t",left)|;..Panel|
|00005120| 20 72 69 67 68 74 20 3d | 20 6e 65 77 20 50 61 6e | right =| new Pan|
|00005130| 65 6c 28 29 3b 0a 09 72 | 69 67 68 74 2e 73 65 74 |el();..r|ight.set|
|00005140| 4c 61 79 6f 75 74 28 6e | 65 77 20 47 72 69 64 4c |Layout(n|ew GridL|
|00005150| 61 79 6f 75 74 28 36 2c | 31 29 29 3b 0a 09 72 69 |ayout(6,|1));..ri|
|00005160| 67 68 74 2e 61 64 64 28 | 6e 65 77 20 53 74 61 74 |ght.add(|new Stat|
|00005170| 69 63 54 65 78 74 46 69 | 65 6c 64 28 53 74 72 69 |icTextFi|eld(Stri|
|00005180| 6e 67 2e 76 61 6c 75 65 | 4f 66 28 69 64 29 29 29 |ng.value|Of(id)))|
|00005190| 3b 0a 09 72 69 67 68 74 | 2e 61 64 64 28 6e 65 77 |;..right|.add(new|
|000051a0| 20 53 74 61 74 69 63 54 | 65 78 74 46 69 65 6c 64 | StaticT|extField|
|000051b0| 28 68 6f 73 74 29 29 3b | 0a 09 72 69 67 68 74 2e |(host));|..right.|
|000051c0| 61 64 64 28 6e 65 77 20 | 53 74 61 74 69 63 54 65 |add(new |StaticTe|
|000051d0| 78 74 46 69 65 6c 64 28 | 6e 61 6d 65 29 29 3b 0a |xtField(|name));.|
|000051e0| 09 72 69 67 68 74 2e 61 | 64 64 28 6e 65 77 20 53 |.right.a|dd(new S|
|000051f0| 74 61 74 69 63 54 65 78 | 74 46 69 65 6c 64 28 6e |taticTex|tField(n|
|00005200| 65 77 20 44 61 74 65 28 | 6c 61 73 74 29 2e 74 6f |ew Date(|last).to|
|00005210| 53 74 72 69 6e 67 28 29 | 29 29 3b 0a 09 72 69 67 |String()|));..rig|
|00005220| 68 74 2e 61 64 64 28 6e | 65 77 20 53 74 61 74 69 |ht.add(n|ew Stati|
|00005230| 63 54 65 78 74 46 69 65 | 6c 64 28 53 74 72 69 6e |cTextFie|ld(Strin|
|00005240| 67 2e 76 61 6c 75 65 4f | 66 28 73 65 6e 74 29 29 |g.valueO|f(sent))|
|00005250| 29 3b 0a 09 72 69 67 68 | 74 2e 61 64 64 28 6e 65 |);..righ|t.add(ne|
|00005260| 77 20 53 74 61 74 69 63 | 54 65 78 74 46 69 65 6c |w Static|TextFiel|
|00005270| 64 28 53 74 72 69 6e 67 | 2e 76 61 6c 75 65 4f 66 |d(String|.valueOf|
|00005280| 28 72 65 63 76 29 29 29 | 3b 0a 09 74 6f 70 2e 61 |(recv)))|;..top.a|
|00005290| 64 64 28 22 43 65 6e 74 | 65 72 22 2c 72 69 67 68 |dd("Cent|er",righ|
|000052a0| 74 29 3b 0a 09 61 64 64 | 28 22 4e 6f 72 74 68 22 |t);..add|("North"|
|000052b0| 2c 74 6f 70 29 3b 0a 09 | 50 61 6e 65 6c 20 62 6f |,top);..|Panel bo|
|000052c0| 74 20 3d 20 6e 65 77 20 | 50 61 6e 65 6c 28 29 3b |t = new |Panel();|
|000052d0| 0a 09 62 6f 74 2e 73 65 | 74 4c 61 79 6f 75 74 28 |..bot.se|tLayout(|
|000052e0| 6e 65 77 20 46 6c 6f 77 | 4c 61 79 6f 75 74 28 46 |new Flow|Layout(F|
|000052f0| 6c 6f 77 4c 61 79 6f 75 | 74 2e 52 49 47 48 54 29 |lowLayou|t.RIGHT)|
|00005300| 29 3b 0a 09 62 6f 74 2e | 61 64 64 28 63 6c 6f 73 |);..bot.|add(clos|
|00005310| 65 20 3d 20 6e 65 77 20 | 42 75 74 74 6f 6e 28 22 |e = new |Button("|
|00005320| 43 6c 6f 73 65 22 29 29 | 3b 0a 09 61 64 64 28 22 |Close"))|;..add("|
|00005330| 53 6f 75 74 68 22 2c 62 | 6f 74 29 3b 0a 0a 09 73 |South",b|ot);...s|
|00005340| 65 74 54 69 74 6c 65 28 | 22 43 6f 6e 6e 65 63 74 |etTitle(|"Connect|
|00005350| 69 6f 6e 20 69 6e 66 6f | 22 29 3b 0a 09 70 61 63 |ion info|");..pac|
|00005360| 6b 28 29 3b 0a 09 73 68 | 6f 77 28 29 3b 0a 09 7d |k();..sh|ow();..}|
|00005370| 0a 0a 09 70 75 62 6c 69 | 63 20 62 6f 6f 6c 65 61 |...publi|c boolea|
|00005380| 6e 20 68 61 6e 64 6c 65 | 45 76 65 6e 74 28 45 76 |n handle|Event(Ev|
|00005390| 65 6e 74 20 65 76 74 29 | 0a 09 7b 0a 09 69 66 20 |ent evt)|..{..if |
|000053a0| 28 65 76 74 2e 69 64 20 | 3d 3d 20 45 76 65 6e 74 |(evt.id |== Event|
|000053b0| 2e 57 49 4e 44 4f 57 5f | 44 45 53 54 52 4f 59 20 |.WINDOW_|DESTROY |
|000053c0| 7c 7c 0a 09 20 20 20 20 | 65 76 74 2e 69 64 20 3d |||.. |evt.id =|
|000053d0| 3d 20 45 76 65 6e 74 2e | 41 43 54 49 4f 4e 5f 45 |= Event.|ACTION_E|
|000053e0| 56 45 4e 54 20 26 26 20 | 65 76 74 2e 74 61 72 67 |VENT && |evt.targ|
|000053f0| 65 74 20 3d 3d 20 63 6c | 6f 73 65 29 0a 09 09 64 |et == cl|ose)...d|
|00005400| 69 73 70 6f 73 65 28 29 | 3b 0a 09 72 65 74 75 72 |ispose()|;..retur|
|00005410| 6e 20 73 75 70 65 72 2e | 68 61 6e 64 6c 65 45 76 |n super.|handleEv|
|00005420| 65 6e 74 28 65 76 74 29 | 3b 0a 09 7d 0a 7d 0a 0a |ent(evt)|;..}.}..|
|00005430| 2f 2f 20 50 72 6f 70 65 | 72 74 69 65 73 50 61 6e |// Prope|rtiesPan|
|00005440| 65 6c 0a 2f 2f 20 44 69 | 73 70 6c 61 79 73 20 61 |el.// Di|splays a|
|00005450| 6c 6c 20 73 65 72 76 65 | 72 20 70 72 6f 70 65 72 |ll serve|r proper|
|00005460| 74 69 65 73 20 63 75 72 | 72 65 6e 74 6c 79 20 73 |ties cur|rently s|
|00005470| 74 6f 72 65 64 20 6f 6e | 20 74 68 65 20 73 65 72 |tored on| the ser|
|00005480| 76 65 72 0a 63 6c 61 73 | 73 20 50 72 6f 70 65 72 |ver.clas|s Proper|
|00005490| 74 69 65 73 50 61 6e 65 | 6c 20 65 78 74 65 6e 64 |tiesPane|l extend|
|000054a0| 73 20 50 61 6e 65 6c 0a | 7b 0a 09 4a 46 53 63 6c |s Panel.|{..JFScl|
|000054b0| 69 65 6e 74 20 63 6c 69 | 65 6e 74 3b 0a 09 44 6f |ient cli|ent;..Do|
|000054c0| 75 62 6c 65 4c 69 73 74 | 50 61 6e 65 6c 20 70 6c |ubleList|Panel pl|
|000054d0| 69 73 74 3b 0a 09 54 65 | 78 74 46 69 65 6c 64 20 |ist;..Te|xtField |
|000054e0| 70 6e 61 6d 65 2c 20 70 | 75 73 65 72 2c 20 70 76 |pname, p|user, pv|
|000054f0| 61 6c 75 65 3b 0a 09 42 | 75 74 74 6f 6e 20 70 73 |alue;..B|utton ps|
|00005500| 61 76 65 2c 20 70 6e 65 | 77 2c 20 70 64 65 6c 2c |ave, pne|w, pdel,|
|00005510| 20 70 72 65 66 3b 0a 0a | 09 56 65 63 74 6f 72 20 | pref;..|.Vector |
|00005520| 70 72 6f 70 3b 09 09 2f | 2f 20 70 72 6f 70 65 72 |prop;../|/ proper|
|00005530| 74 69 65 73 20 66 72 6f | 6d 20 73 65 72 76 65 72 |ties fro|m server|
|00005540| 0a 0a 09 50 72 6f 70 65 | 72 74 69 65 73 50 61 6e |...Prope|rtiesPan|
|00005550| 65 6c 28 29 0a 09 7b 0a | 09 2f 2f 20 63 72 65 61 |el()..{.|.// crea|
|00005560| 74 65 20 75 73 65 72 20 | 69 6e 74 65 72 66 61 63 |te user |interfac|
|00005570| 65 0a 09 73 65 74 4c 61 | 79 6f 75 74 28 6e 65 77 |e..setLa|yout(new|
|00005580| 20 47 72 69 64 4c 61 79 | 6f 75 74 28 31 2c 32 29 | GridLay|out(1,2)|
|00005590| 29 3b 0a 09 50 61 6e 65 | 6c 20 6c 65 66 74 20 3d |);..Pane|l left =|
|000055a0| 20 6e 65 77 20 50 61 6e | 65 6c 28 29 3b 0a 09 6c | new Pan|el();..l|
|000055b0| 65 66 74 2e 73 65 74 4c | 61 79 6f 75 74 28 6e 65 |eft.setL|ayout(ne|
|000055c0| 77 20 42 6f 72 64 65 72 | 4c 61 79 6f 75 74 28 29 |w Border|Layout()|
|000055d0| 29 3b 0a 09 6c 65 66 74 | 2e 61 64 64 28 22 43 65 |);..left|.add("Ce|
|000055e0| 6e 74 65 72 22 2c 20 70 | 6c 69 73 74 20 3d 20 6e |nter", p|list = n|
|000055f0| 65 77 20 44 6f 75 62 6c | 65 4c 69 73 74 50 61 6e |ew Doubl|eListPan|
|00005600| 65 6c 28 22 50 72 6f 70 | 65 72 74 79 22 2c 20 22 |el("Prop|erty", "|
|00005610| 4f 77 6e 65 72 22 29 29 | 3b 0a 09 6c 65 66 74 2e |Owner"))|;..left.|
|00005620| 61 64 64 28 22 53 6f 75 | 74 68 22 2c 20 70 72 65 |add("Sou|th", pre|
|00005630| 66 20 3d 20 6e 65 77 20 | 42 75 74 74 6f 6e 28 22 |f = new |Button("|
|00005640| 52 65 66 72 65 73 68 22 | 29 29 3b 0a 09 61 64 64 |Refresh"|));..add|
|00005650| 28 6c 65 66 74 29 3b 0a | 09 50 61 6e 65 6c 20 72 |(left);.|.Panel r|
|00005660| 69 67 68 74 20 3d 20 6e | 65 77 20 50 61 6e 65 6c |ight = n|ew Panel|
|00005670| 28 29 3b 0a 09 72 69 67 | 68 74 2e 73 65 74 4c 61 |();..rig|ht.setLa|
|00005680| 79 6f 75 74 28 6e 65 77 | 20 42 6f 72 64 65 72 4c |yout(new| BorderL|
|00005690| 61 79 6f 75 74 28 29 29 | 3b 0a 09 50 61 6e 65 6c |ayout())|;..Panel|
|000056a0| 20 72 74 20 3d 20 6e 65 | 77 20 50 61 6e 65 6c 28 | rt = ne|w Panel(|
|000056b0| 29 3b 0a 09 72 74 2e 73 | 65 74 4c 61 79 6f 75 74 |);..rt.s|etLayout|
|000056c0| 28 6e 65 77 20 47 72 69 | 64 4c 61 79 6f 75 74 28 |(new Gri|dLayout(|
|000056d0| 36 2c 31 29 29 3b 0a 09 | 72 74 2e 61 64 64 28 6e |6,1));..|rt.add(n|
|000056e0| 65 77 20 4c 61 62 65 6c | 28 22 50 72 6f 70 65 72 |ew Label|("Proper|
|000056f0| 74 79 22 29 29 3b 0a 09 | 72 74 2e 61 64 64 28 70 |ty"));..|rt.add(p|
|00005700| 6e 61 6d 65 20 3d 20 6e | 65 77 20 54 65 78 74 46 |name = n|ew TextF|
|00005710| 69 65 6c 64 28 29 29 3b | 0a 09 72 74 2e 61 64 64 |ield());|..rt.add|
|00005720| 28 6e 65 77 20 4c 61 62 | 65 6c 28 22 4f 77 6e 65 |(new Lab|el("Owne|
|00005730| 72 22 29 29 3b 0a 09 72 | 74 2e 61 64 64 28 70 75 |r"));..r|t.add(pu|
|00005740| 73 65 72 20 3d 20 6e 65 | 77 20 54 65 78 74 46 69 |ser = ne|w TextFi|
|00005750| 65 6c 64 28 29 29 3b 0a | 09 72 74 2e 61 64 64 28 |eld());.|.rt.add(|
|00005760| 6e 65 77 20 4c 61 62 65 | 6c 28 22 56 61 6c 75 65 |new Labe|l("Value|
|00005770| 22 29 29 3b 0a 09 72 74 | 2e 61 64 64 28 70 76 61 |"));..rt|.add(pva|
|00005780| 6c 75 65 20 3d 20 6e 65 | 77 20 54 65 78 74 46 69 |lue = ne|w TextFi|
|00005790| 65 6c 64 28 29 29 3b 0a | 09 72 69 67 68 74 2e 61 |eld());.|.right.a|
|000057a0| 64 64 28 22 4e 6f 72 74 | 68 22 2c 72 74 29 3b 0a |dd("Nort|h",rt);.|
|000057b0| 09 50 61 6e 65 6c 20 72 | 62 20 3d 20 6e 65 77 20 |.Panel r|b = new |
|000057c0| 50 61 6e 65 6c 28 29 3b | 0a 09 72 62 2e 73 65 74 |Panel();|..rb.set|
|000057d0| 4c 61 79 6f 75 74 28 6e | 65 77 20 46 6c 6f 77 4c |Layout(n|ew FlowL|
|000057e0| 61 79 6f 75 74 28 46 6c | 6f 77 4c 61 79 6f 75 74 |ayout(Fl|owLayout|
|000057f0| 2e 52 49 47 48 54 29 29 | 3b 0a 09 72 62 2e 61 64 |.RIGHT))|;..rb.ad|
|00005800| 64 28 70 73 61 76 65 20 | 3d 20 6e 65 77 20 42 75 |d(psave |= new Bu|
|00005810| 74 74 6f 6e 28 22 53 61 | 76 65 22 29 29 3b 0a 09 |tton("Sa|ve"));..|
|00005820| 72 62 2e 61 64 64 28 70 | 6e 65 77 20 3d 20 6e 65 |rb.add(p|new = ne|
|00005830| 77 20 42 75 74 74 6f 6e | 28 22 4e 65 77 22 29 29 |w Button|("New"))|
|00005840| 3b 0a 09 72 62 2e 61 64 | 64 28 70 64 65 6c 20 3d |;..rb.ad|d(pdel =|
|00005850| 20 6e 65 77 20 42 75 74 | 74 6f 6e 28 22 44 65 6c | new But|ton("Del|
|00005860| 65 74 65 22 29 29 3b 0a | 09 72 69 67 68 74 2e 61 |ete"));.|.right.a|
|00005870| 64 64 28 22 53 6f 75 74 | 68 22 2c 72 62 29 3b 0a |dd("Sout|h",rb);.|
|00005880| 09 61 64 64 28 72 69 67 | 68 74 29 3b 0a 09 7d 0a |.add(rig|ht);..}.|
|00005890| 0a 09 2f 2f 20 63 6f 6e | 6e 65 63 74 0a 09 2f 2f |..// con|nect..//|
|000058a0| 20 52 65 61 64 20 61 6e | 64 20 64 69 73 70 6c 61 | Read an|d displa|
|000058b0| 79 20 70 72 6f 70 65 72 | 74 69 65 73 0a 09 76 6f |y proper|ties..vo|
|000058c0| 69 64 20 63 6f 6e 6e 65 | 63 74 28 4a 46 53 63 6c |id conne|ct(JFScl|
|000058d0| 69 65 6e 74 20 63 29 0a | 09 7b 0a 09 63 6c 69 65 |ient c).|.{..clie|
|000058e0| 6e 74 20 3d 20 63 3b 0a | 09 70 72 65 61 64 28 29 |nt = c;.|.pread()|
|000058f0| 3b 0a 09 70 66 69 6c 6c | 28 29 3b 0a 09 7d 0a 0a |;..pfill|();..}..|
|00005900| 09 2f 2f 20 70 72 65 61 | 64 0a 09 2f 2f 20 52 65 |.// prea|d..// Re|
|00005910| 61 64 20 61 6c 6c 20 70 | 72 6f 70 65 72 74 69 65 |ad all p|ropertie|
|00005920| 73 20 66 72 6f 6d 20 74 | 68 65 20 73 65 72 76 65 |s from t|he serve|
|00005930| 72 0a 09 76 6f 69 64 20 | 70 72 65 61 64 28 29 0a |r..void |pread().|
|00005940| 09 7b 0a 09 70 72 6f 70 | 20 3d 20 6e 65 77 20 56 |.{..prop| = new V|
|00005950| 65 63 74 6f 72 28 29 3b | 0a 09 4d 65 73 73 61 67 |ector();|..Messag|
|00005960| 65 20 68 65 61 64 20 3d | 20 6e 65 77 20 4d 65 73 |e head =| new Mes|
|00005970| 73 61 67 65 28 29 2c 20 | 72 20 3d 20 6e 75 6c 6c |sage(), |r = null|
|00005980| 3b 0a 09 68 65 61 64 2e | 61 64 64 28 22 43 6f 6d |;..head.|add("Com|
|00005990| 6d 61 6e 64 22 2c 22 50 | 72 6f 70 65 72 74 69 65 |mand","P|ropertie|
|000059a0| 73 22 29 3b 0a 09 74 72 | 79 20 72 20 3d 20 63 6c |s");..tr|y r = cl|
|000059b0| 69 65 6e 74 2e 64 65 76 | 67 65 74 28 22 2f 64 65 |ient.dev|get("/de|
|000059c0| 76 2f 53 65 72 76 65 72 | 22 2c 20 68 65 61 64 29 |v/Server|", head)|
|000059d0| 3b 0a 09 63 61 74 63 68 | 28 52 65 71 75 65 73 74 |;..catch|(Request|
|000059e0| 45 78 63 65 70 74 69 6f | 6e 20 65 29 20 7b 0a 09 |Exceptio|n e) {..|
|000059f0| 09 6e 65 77 20 45 72 72 | 6f 72 57 69 6e 64 6f 77 |.new Err|orWindow|
|00005a00| 28 22 46 61 69 6c 65 64 | 20 74 6f 20 72 65 61 64 |("Failed| to read|
|00005a10| 20 70 72 6f 70 65 72 74 | 69 65 73 20 66 72 6f 6d | propert|ies from|
|00005a20| 20 73 65 72 76 65 72 22 | 29 3b 0a 09 09 72 65 74 | server"|);...ret|
|00005a30| 75 72 6e 3b 0a 09 09 7d | 0a 09 42 75 66 66 65 72 |urn;...}|..Buffer|
|00005a40| 49 6e 70 75 74 53 74 72 | 65 61 6d 20 62 75 66 20 |InputStr|eam buf |
|00005a50| 3d 20 6e 65 77 20 42 75 | 66 66 65 72 49 6e 70 75 |= new Bu|fferInpu|
|00005a60| 74 53 74 72 65 61 6d 28 | 72 2e 67 65 74 64 61 74 |tStream(|r.getdat|
|00005a70| 61 28 29 29 3b 0a 09 74 | 72 79 20 7b 0a 09 09 77 |a());..t|ry {...w|
|00005a80| 68 69 6c 65 28 74 72 75 | 65 29 0a 09 09 09 70 72 |hile(tru|e)....pr|
|00005a90| 6f 70 2e 61 64 64 45 6c | 65 6d 65 6e 74 28 6e 65 |op.addEl|ement(ne|
|00005aa0| 77 20 53 65 72 76 65 72 | 50 72 6f 70 65 72 74 79 |w Server|Property|
|00005ab0| 28 62 75 66 2e 67 65 74 | 73 28 29 29 29 3b 0a 09 |(buf.get|s()));..|
|00005ac0| 09 7d 0a 09 63 61 74 63 | 68 28 49 4f 45 78 63 65 |.}..catc|h(IOExce|
|00005ad0| 70 74 69 6f 6e 20 65 29 | 3b 0a 09 7d 0a 0a 09 2f |ption e)|;..}.../|
|00005ae0| 2f 20 70 66 69 6c 6c 0a | 09 2f 2f 20 44 69 73 70 |/ pfill.|.// Disp|
|00005af0| 6c 61 79 20 70 72 6f 70 | 65 72 74 69 65 73 20 69 |lay prop|erties i|
|00005b00| 6e 20 74 68 65 20 6c 69 | 73 74 0a 09 76 6f 69 64 |n the li|st..void|
|00005b10| 20 70 66 69 6c 6c 28 29 | 0a 09 7b 0a 09 70 6c 69 | pfill()|..{..pli|
|00005b20| 73 74 2e 63 6c 65 61 72 | 28 29 3b 0a 09 66 6f 72 |st.clear|();..for|
|00005b30| 28 69 6e 74 20 69 3d 30 | 3b 20 69 3c 70 72 6f 70 |(int i=0|; i<prop|
|00005b40| 2e 73 69 7a 65 28 29 3b | 20 69 2b 2b 29 20 7b 0a |.size();| i++) {.|
|00005b50| 09 09 53 65 72 76 65 72 | 50 72 6f 70 65 72 74 79 |..Server|Property|
|00005b60| 20 70 20 3d 20 28 53 65 | 72 76 65 72 50 72 6f 70 | p = (Se|rverProp|
|00005b70| 65 72 74 79 29 70 72 6f | 70 2e 65 6c 65 6d 65 6e |erty)pro|p.elemen|
|00005b80| 74 41 74 28 69 29 3b 0a | 09 09 70 6c 69 73 74 2e |tAt(i);.|..plist.|
|00005b90| 61 64 64 49 74 65 6d 28 | 70 2e 6e 61 6d 65 2c 20 |addItem(|p.name, |
|00005ba0| 70 2e 75 73 65 72 29 3b | 0a 09 09 7d 0a 09 7d 0a |p.user);|...}..}.|
|00005bb0| 0a 09 70 75 62 6c 69 63 | 20 62 6f 6f 6c 65 61 6e |..public| boolean|
|00005bc0| 20 61 63 74 69 6f 6e 28 | 45 76 65 6e 74 20 65 76 | action(|Event ev|
|00005bd0| 74 2c 20 4f 62 6a 65 63 | 74 20 6f 62 6a 29 0a 09 |t, Objec|t obj)..|
|00005be0| 7b 0a 09 69 66 20 28 65 | 76 74 2e 74 61 72 67 65 |{..if (e|vt.targe|
|00005bf0| 74 20 3d 3d 20 70 6c 69 | 73 74 29 20 7b 0a 09 09 |t == pli|st) {...|
|00005c00| 2f 2f 20 50 72 6f 70 65 | 72 74 79 20 63 68 6f 73 |// Prope|rty chos|
|00005c10| 65 6e 20 66 72 6f 6d 20 | 6c 69 73 74 0a 09 09 69 |en from |list...i|
|00005c20| 6e 74 20 73 65 6c 20 3d | 20 70 6c 69 73 74 2e 73 |nt sel =| plist.s|
|00005c30| 65 6c 65 63 74 65 64 28 | 29 3b 0a 09 09 53 65 72 |elected(|);...Ser|
|00005c40| 76 65 72 50 72 6f 70 65 | 72 74 79 20 70 20 3d 20 |verPrope|rty p = |
|00005c50| 28 53 65 72 76 65 72 50 | 72 6f 70 65 72 74 79 29 |(ServerP|roperty)|
|00005c60| 70 72 6f 70 2e 65 6c 65 | 6d 65 6e 74 41 74 28 73 |prop.ele|mentAt(s|
|00005c70| 65 6c 29 3b 0a 09 09 70 | 6e 61 6d 65 2e 73 65 74 |el);...p|name.set|
|00005c80| 54 65 78 74 28 70 2e 6e | 61 6d 65 29 3b 0a 09 09 |Text(p.n|ame);...|
|00005c90| 70 75 73 65 72 2e 73 65 | 74 54 65 78 74 28 70 2e |puser.se|tText(p.|
|00005ca0| 75 73 65 72 29 3b 0a 09 | 09 70 76 61 6c 75 65 2e |user);..|.pvalue.|
|00005cb0| 73 65 74 54 65 78 74 28 | 70 2e 76 61 6c 75 65 29 |setText(|p.value)|
|00005cc0| 3b 0a 09 09 73 65 74 6d | 6f 64 28 70 2e 65 78 74 |;...setm|od(p.ext|
|00005cd0| 65 72 6e 61 6c 29 3b 0a | 09 09 7d 0a 09 65 6c 73 |ernal);.|..}..els|
|00005ce0| 65 20 69 66 20 28 65 76 | 74 2e 74 61 72 67 65 74 |e if (ev|t.target|
|00005cf0| 20 3d 3d 20 70 72 65 66 | 29 20 7b 0a 09 09 2f 2f | == pref|) {...//|
|00005d00| 20 52 65 66 72 65 73 68 | 20 70 72 6f 70 65 72 74 | Refresh| propert|
|00005d10| 69 65 73 20 62 75 74 74 | 6f 6e 20 63 6c 69 63 6b |ies butt|on click|
|00005d20| 65 64 0a 09 09 70 72 65 | 61 64 28 29 3b 0a 09 09 |ed...pre|ad();...|
|00005d30| 70 66 69 6c 6c 28 29 3b | 0a 09 09 7d 0a 09 65 6c |pfill();|...}..el|
|00005d40| 73 65 20 69 66 20 28 65 | 76 74 2e 74 61 72 67 65 |se if (e|vt.targe|
|00005d50| 74 20 3d 3d 20 70 6e 65 | 77 29 20 7b 0a 09 09 2f |t == pne|w) {.../|
|00005d60| 2f 20 4e 65 77 20 62 75 | 74 74 6f 6e 20 63 6c 69 |/ New bu|tton cli|
|00005d70| 63 6b 65 64 0a 09 09 70 | 6e 61 6d 65 2e 73 65 74 |cked...p|name.set|
|00005d80| 54 65 78 74 28 22 22 29 | 3b 0a 09 09 70 75 73 65 |Text("")|;...puse|
|00005d90| 72 2e 73 65 74 54 65 78 | 74 28 22 22 29 3b 0a 09 |r.setTex|t("");..|
|00005da0| 09 70 76 61 6c 75 65 2e | 73 65 74 54 65 78 74 28 |.pvalue.|setText(|
|00005db0| 22 22 29 3b 0a 09 09 73 | 65 74 6d 6f 64 28 74 72 |"");...s|etmod(tr|
|00005dc0| 75 65 29 3b 0a 09 09 7d | 0a 09 65 6c 73 65 20 69 |ue);...}|..else i|
|00005dd0| 66 20 28 65 76 74 2e 74 | 61 72 67 65 74 20 3d 3d |f (evt.t|arget ==|
|00005de0| 20 70 73 61 76 65 29 20 | 7b 0a 09 09 2f 2f 20 53 | psave) |{...// S|
|00005df0| 61 76 65 20 70 72 6f 70 | 65 72 74 79 20 62 75 74 |ave prop|erty but|
|00005e00| 74 6f 6e 20 63 6c 69 63 | 6b 65 64 0a 09 09 53 65 |ton clic|ked...Se|
|00005e10| 72 76 65 72 50 72 6f 70 | 65 72 74 79 20 6e 70 20 |rverProp|erty np |
|00005e20| 3d 20 6e 65 77 20 53 65 | 72 76 65 72 50 72 6f 70 |= new Se|rverProp|
|00005e30| 65 72 74 79 28 70 6e 61 | 6d 65 2e 67 65 74 54 65 |erty(pna|me.getTe|
|00005e40| 78 74 28 29 2c 0a 09 09 | 09 09 09 09 20 20 20 20 |xt(),...|.... |
|00005e50| 20 20 20 70 75 73 65 72 | 2e 67 65 74 54 65 78 74 | puser|.getText|
|00005e60| 28 29 2c 0a 09 09 09 09 | 09 09 20 20 20 20 20 20 |(),.....|.. |
|00005e70| 20 70 76 61 6c 75 65 2e | 67 65 74 54 65 78 74 28 | pvalue.|getText(|
|00005e80| 29 2c 0a 09 09 09 09 09 | 09 20 20 20 20 20 20 20 |),......|. |
|00005e90| 74 72 75 65 29 3b 0a 09 | 09 63 6c 69 65 6e 74 2e |true);..|.client.|
|00005ea0| 70 75 74 70 72 6f 70 28 | 6e 70 29 3b 0a 09 09 70 |putprop(|np);...p|
|00005eb0| 72 65 61 64 28 29 3b 0a | 09 09 70 66 69 6c 6c 28 |read();.|..pfill(|
|00005ec0| 29 3b 0a 09 09 7d 0a 09 | 65 6c 73 65 20 69 66 20 |);...}..|else if |
|00005ed0| 28 65 76 74 2e 74 61 72 | 67 65 74 20 3d 3d 20 70 |(evt.tar|get == p|
|00005ee0| 64 65 6c 29 20 7b 0a 09 | 09 2f 2f 20 44 65 6c 65 |del) {..|.// Dele|
|00005ef0| 74 65 20 70 72 6f 70 65 | 72 74 79 20 62 75 74 74 |te prope|rty butt|
|00005f00| 6f 6e 20 63 6c 69 63 6b | 65 64 0a 09 09 69 6e 74 |on click|ed...int|
|00005f10| 20 73 65 6c 20 3d 20 70 | 6c 69 73 74 2e 73 65 6c | sel = p|list.sel|
|00005f20| 65 63 74 65 64 28 29 3b | 0a 09 09 69 66 20 28 73 |ected();|...if (s|
|00005f30| 65 6c 20 3c 20 30 29 20 | 72 65 74 75 72 6e 20 74 |el < 0) |return t|
|00005f40| 72 75 65 3b 0a 09 09 53 | 65 72 76 65 72 50 72 6f |rue;...S|erverPro|
|00005f50| 70 65 72 74 79 20 76 69 | 63 20 3d 20 28 53 65 72 |perty vi|c = (Ser|
|00005f60| 76 65 72 50 72 6f 70 65 | 72 74 79 29 70 72 6f 70 |verPrope|rty)prop|
|00005f70| 2e 65 6c 65 6d 65 6e 74 | 41 74 28 73 65 6c 29 3b |.element|At(sel);|
|00005f80| 0a 09 09 63 6c 69 65 6e | 74 2e 64 65 6c 70 72 6f |...clien|t.delpro|
|00005f90| 70 28 76 69 63 2e 6e 61 | 6d 65 2c 20 76 69 63 2e |p(vic.na|me, vic.|
|00005fa0| 75 73 65 72 29 3b 0a 09 | 09 70 72 65 61 64 28 29 |user);..|.pread()|
|00005fb0| 3b 0a 09 09 70 66 69 6c | 6c 28 29 3b 0a 09 09 7d |;...pfil|l();...}|
|00005fc0| 0a 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0a 09 |..return| true;..|
|00005fd0| 7d 0a 0a 09 2f 2f 20 73 | 65 74 6d 6f 64 0a 09 2f |}...// s|etmod../|
|00005fe0| 2f 20 45 6e 61 62 6c 65 | 20 6f 72 20 64 69 73 70 |/ Enable| or disp|
|00005ff0| 6c 61 79 20 65 64 69 74 | 69 6e 67 20 6f 66 20 70 |lay edit|ing of p|
|00006000| 72 6f 70 65 72 74 79 20 | 64 65 74 61 69 6c 73 0a |roperty |details.|
|00006010| 09 76 6f 69 64 20 73 65 | 74 6d 6f 64 28 62 6f 6f |.void se|tmod(boo|
|00006020| 6c 65 61 6e 20 6d 29 0a | 09 7b 0a 09 70 6e 61 6d |lean m).|.{..pnam|
|00006030| 65 2e 73 65 74 45 64 69 | 74 61 62 6c 65 28 6d 29 |e.setEdi|table(m)|
|00006040| 3b 0a 09 70 75 73 65 72 | 2e 73 65 74 45 64 69 74 |;..puser|.setEdit|
|00006050| 61 62 6c 65 28 6d 29 3b | 0a 09 70 76 61 6c 75 65 |able(m);|..pvalue|
|00006060| 2e 73 65 74 45 64 69 74 | 61 62 6c 65 28 6d 29 3b |.setEdit|able(m);|
|00006070| 0a 09 70 73 61 76 65 2e | 65 6e 61 62 6c 65 28 6d |..psave.|enable(m|
|00006080| 29 3b 0a 09 7d 0a 7d 0a | 0a 2f 2f 20 44 65 76 69 |);..}.}.|.// Devi|
|00006090| 63 65 73 50 61 6e 65 6c | 0a 2f 2f 20 44 69 73 70 |cesPanel|.// Disp|
|000060a0| 6c 61 79 73 20 64 65 76 | 69 63 65 73 20 66 69 6c |lays dev|ices fil|
|000060b0| 65 73 20 69 6e 20 2f 64 | 65 76 20 61 6e 64 20 74 |es in /d|ev and t|
|000060c0| 68 65 69 72 20 70 65 72 | 6d 69 73 73 69 6f 6e 73 |heir per|missions|
|000060d0| 2e 0a 63 6c 61 73 73 20 | 44 65 76 69 63 65 73 50 |..class |DevicesP|
|000060e0| 61 6e 65 6c 20 65 78 74 | 65 6e 64 73 20 50 61 6e |anel ext|ends Pan|
|000060f0| 65 6c 0a 7b 0a 09 4a 46 | 53 63 6c 69 65 6e 74 20 |el.{..JF|Sclient |
|00006100| 63 6c 69 65 6e 74 3b 0a | 09 4a 46 53 64 69 72 65 |client;.|.JFSdire|
|00006110| 63 74 6f 72 79 20 64 65 | 76 69 63 65 73 3b 0a 09 |ctory de|vices;..|
|00006120| 44 6f 75 62 6c 65 4c 69 | 73 74 50 61 6e 65 6c 20 |DoubleLi|stPanel |
|00006130| 6c 69 73 74 3b 0a 09 42 | 75 74 74 6f 6e 20 61 64 |list;..B|utton ad|
|00006140| 64 2c 20 64 65 6c 3b 0a | 0a 09 44 65 76 69 63 65 |d, del;.|..Device|
|00006150| 73 50 61 6e 65 6c 28 29 | 0a 09 7b 0a 09 73 65 74 |sPanel()|..{..set|
|00006160| 4c 61 79 6f 75 74 28 6e | 65 77 20 42 6f 72 64 65 |Layout(n|ew Borde|
|00006170| 72 4c 61 79 6f 75 74 28 | 29 29 3b 0a 09 61 64 64 |rLayout(|));..add|
|00006180| 28 22 43 65 6e 74 65 72 | 22 2c 20 6c 69 73 74 20 |("Center|", list |
|00006190| 3d 20 6e 65 77 20 44 6f | 75 62 6c 65 4c 69 73 74 |= new Do|ubleList|
|000061a0| 50 61 6e 65 6c 28 22 44 | 65 76 69 63 65 22 2c 20 |Panel("D|evice", |
|000061b0| 22 50 65 72 6d 69 73 73 | 69 6f 6e 73 22 29 29 3b |"Permiss|ions"));|
|000061c0| 0a 09 50 61 6e 65 6c 20 | 74 6f 70 20 3d 20 6e 65 |..Panel |top = ne|
|000061d0| 77 20 50 61 6e 65 6c 28 | 29 3b 0a 09 74 6f 70 2e |w Panel(|);..top.|
|000061e0| 73 65 74 4c 61 79 6f 75 | 74 28 6e 65 77 20 46 6c |setLayou|t(new Fl|
|000061f0| 6f 77 4c 61 79 6f 75 74 | 28 46 6c 6f 77 4c 61 79 |owLayout|(FlowLay|
|00006200| 6f 75 74 2e 4c 45 46 54 | 29 29 3b 0a 09 74 6f 70 |out.LEFT|));..top|
|00006210| 2e 61 64 64 28 61 64 64 | 20 3d 20 6e 65 77 20 42 |.add(add| = new B|
|00006220| 75 74 74 6f 6e 28 22 41 | 64 64 22 29 29 3b 0a 09 |utton("A|dd"));..|
|00006230| 74 6f 70 2e 61 64 64 28 | 64 65 6c 20 3d 20 6e 65 |top.add(|del = ne|
|00006240| 77 20 42 75 74 74 6f 6e | 28 22 44 65 6c 65 74 65 |w Button|("Delete|
|00006250| 22 29 29 3b 0a 09 61 64 | 64 28 22 4e 6f 72 74 68 |"));..ad|d("North|
|00006260| 22 2c 20 74 6f 70 29 3b | 0a 09 7d 0a 0a 09 2f 2f |", top);|..}...//|
|00006270| 20 63 6f 6e 6e 65 63 74 | 0a 09 2f 2f 20 52 65 74 | connect|..// Ret|
|00006280| 72 69 65 76 65 20 61 20 | 6c 69 73 74 20 6f 66 20 |rieve a |list of |
|00006290| 64 65 76 69 63 65 73 20 | 66 72 6f 6d 20 74 68 65 |devices |from the|
|000062a0| 20 73 65 72 76 65 72 0a | 09 76 6f 69 64 20 63 6f | server.|.void co|
|000062b0| 6e 6e 65 63 74 28 4a 46 | 53 63 6c 69 65 6e 74 20 |nnect(JF|Sclient |
|000062c0| 63 29 0a 09 7b 0a 09 63 | 6c 69 65 6e 74 20 3d 20 |c)..{..c|lient = |
|000062d0| 63 3b 0a 09 4a 46 53 64 | 69 72 65 63 74 6f 72 79 |c;..JFSd|irectory|
|000062e0| 20 64 20 3d 20 6e 75 6c | 6c 3b 0a 09 74 72 79 20 | d = nul|l;..try |
|000062f0| 64 65 76 69 63 65 73 20 | 3d 20 63 6c 69 65 6e 74 |devices |= client|
|00006300| 2e 67 65 74 64 69 72 28 | 22 2f 64 65 76 22 29 3b |.getdir(|"/dev");|
|00006310| 0a 09 63 61 74 63 68 28 | 52 65 71 75 65 73 74 45 |..catch(|RequestE|
|00006320| 78 63 65 70 74 69 6f 6e | 20 65 29 20 7b 0a 09 09 |xception| e) {...|
|00006330| 6e 65 77 20 45 72 72 6f | 72 57 69 6e 64 6f 77 28 |new Erro|rWindow(|
|00006340| 22 43 6f 75 6c 64 20 6e | 6f 74 20 72 65 61 64 20 |"Could n|ot read |
|00006350| 2f 64 65 76 20 3a 20 22 | 2b 65 2e 67 65 74 4d 65 |/dev : "|+e.getMe|
|00006360| 73 73 61 67 65 28 29 29 | 3b 0a 09 09 72 65 74 75 |ssage())|;...retu|
|00006370| 72 6e 3b 0a 09 09 7d 0a | 09 66 69 6c 6c 28 29 3b |rn;...}.|.fill();|
|00006380| 0a 09 7d 0a 0a 09 2f 2f | 20 66 69 6c 6c 0a 09 2f |..}...//| fill../|
|00006390| 2f 20 44 69 73 70 6c 61 | 79 20 74 68 65 20 69 6d |/ Displa|y the im|
|000063a0| 70 6f 72 74 61 6e 74 20 | 73 74 75 66 66 20 66 72 |portant |stuff fr|
|000063b0| 6f 6d 20 2f 64 65 76 20 | 69 6e 20 74 68 65 20 6c |om /dev |in the l|
|000063c0| 69 73 74 0a 09 76 6f 69 | 64 20 66 69 6c 6c 28 29 |ist..voi|d fill()|
|000063d0| 0a 09 7b 0a 09 6c 69 73 | 74 2e 63 6c 65 61 72 28 |..{..lis|t.clear(|
|000063e0| 29 3b 0a 09 66 6f 72 28 | 69 6e 74 20 69 3d 30 3b |);..for(|int i=0;|
|000063f0| 20 69 3c 64 65 76 69 63 | 65 73 2e 73 69 7a 65 28 | i<devic|es.size(|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.